将弹出的代码直接放到主线程执行
dispatch_async(dispatch_get_main_queue(), ^{
[self presentViewController:AlertView animated:YES completion:nil];
});
转载于:https://www.cnblogs.com/fendoulushangdefenqing/p/8359962.html