给tableViewCell添加选中事件的时候,调用UIAlertController,但是UIAlertController弹出有点延迟

具体原因我认为是runloop没有及时更新UI。
解决办法
[selfpresentViewController:AlertControlleranimated:YEScompletion:nil];
改为下面的方法:
dispatch_async(dispatch_get_main_queue(), ^{
[selfpresentViewController: AlertControlleranimated: YEScompletion: nil];
});

你可能感兴趣的:(给tableViewCell添加选中事件的时候,调用UIAlertController,但是UIAlertController弹出有点延迟)