美文网首页
iOS中点击UITableViewcell弹出UIALertCo

iOS中点击UITableViewcell弹出UIALertCo

作者: 最强的小强 | 来源:发表于2019-04-17 16:13 被阅读0次

延迟是因为UIAlertController的操作是在子线程中的
解决方案1:把他放到主线程中

   dispatch_async(dispatch_get_main_queue(), ^{
        [self presentViewController:alertC animated:YES completion:nil];
   });

解决方案2:点击cell,关闭动画

    [tableView deselectRowAtIndexPath:indexPath animated:NO];

相关文章

网友评论

      本文标题:iOS中点击UITableViewcell弹出UIALertCo

      本文链接:https://www.haomeiwen.com/subject/dbpnwqtx.html