错误:
Warning: Attempt to present <UIImagePickerController: 0x13e190600> on <RotateNavigationController: 0x13e090600> which is already presenting (null)
解决方案:presentVC方法放入主线程
__weak typeof(self) weakSelf = self;
if([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0)
{
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[self presentViewController:weakSelf.ipc animated:NO completion:nil];
}];
}
else{
[self presentViewController:weakSelf.ipc animated:NO completion:nil];
}
或者
dispatch_async(dispatch_get_main_queue(), ^ {
[self.viewController presentViewController:vc animated:YES completion:nil];
});