UIAlertController弹出非常慢
2018-11-27 本文已影响0人
biyu6
bug:在点击tableViewCell调用UIAlertController时,弹出框要过好几秒才会弹出
解决一:
你设置了 cell.selectionStyle = UITableViewCellSelectionStyleNone;将其改为UITableViewCellSelectionStyleDefault,或者去掉就行;
解决二:
将present的代码放在主线程中执行
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController: alertController animated: YES completion: nil];
});