iOS8 iPad Warning: Attempt to present <UIImagePickerController:xxxx > on xxxx which is already presenting (null)
解决方法:
/*
I think this is because in iOS 8, alert views and action sheets are actually presented view controllers
(UIAlertController). So, if you're presenting a new view controller in response to an action from the UIAlertView,
it's being presented while the UIAlertController is being dismissed.I worked around this by delaying the
presentation of the UIImagePickerController until the next iteration of the runloop, by doing this:
*/
__weak typeof(self) weakSelf = self;
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[weakSelf presentViewController:imagePicker animated:YES completion:nil];
}];
However, the proper way to fix this is to use the new UIAlertController API on iOS 8 (i.e. use if ([UIAlertController class]) ... to test for it). This is just a workaround if you can't use the new API yet.
iOS8 iPad Warning: Attempt to present <UIImagePickerController:xxxx > on xxxx which is already presenting (null)的更多相关文章
- Warning: Attempt to present on whose view is not in the window hierarchy!
当我想从一个VC跳转到另一个VC的时候,一般会用 - (void)presentViewController:(UIViewController *)viewControllerToPresent a ...
- Warning: Attempt to present * on * which is already presenting *
Warning: Attempt to present (要被presented的控制器) on (哪个控制器来presenting) which is already presenting (已经 ...
- 错误:Warning: Attempt to present <UIAlertController: 0x7fd192806e20> on <ViewController: 0x7fd1928048d0> whose view is not in the window hierarchy!
系统:mac OS 10.12 (16A323) Xcod:8.3.3 错误:Warning: Attempt to present <UIAlertController: 0x7fd1928 ...
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
昨天写豆瓣发广播Demo的时候,为了写Demo的简单,就使用了Storyboard,结果执行视图跳转时遇到了这个问题: Warning: Attempt to present <UINaviga ...
- Warning: Attempt to present on whose view is not in模态跳转问题
错误分析: controller A present controller B ,前提是A的view要存在,如果不存在,就会报这个错. 解决方法: 将 ...
- Attempt to present <vc> on <vc> which is already presenting <vc>/(null)
在给 tableViewCell 添加长按手势弹出一个 popViewController 的时候,遇到的这个变态问题: Warning: Attempt to present <UINavig ...
- Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!
当 storyboard里面的 按钮 即连接了 类文件里面的点击方法 又 连接了 storyboard里 另一个 控制器的 modal 就会出现类似Attempt to present & ...
- swift一次 Attempt to present on whose view is not in the window hierarchy的解决方法
做的是二维码扫描,扫描后识别为URL的话就跳转到webview 加载网页,用的是代理传值的方式.扫描到了 值传递到主页 扫描窗体退出,检测值是否是http://开头 是网页就跳转. 问题出在传值到主界 ...
- 跳转时候提示Attempt to present on while a presentation is in progress
出现这种情况,例如:我在获取相册图片后,直接present到另一个页面,但是上一个页面可能还未dismiss,所以,要在获取相册图片的dismiss方法的complete的block里面写获取图片及跳 ...
随机推荐
- Excel通过宏创建百万数据
打开视图->宏->编辑,代码如下,cells(n,m)表示当前Excel表格第n行第m列</span> Sub newdata() Dim i As Long Cells(i, ...
- Unity给力插件之LittleLocalization
从网上随便下载了一个多语言的插件,原理很简单,自己就可以写一个.不过本身插件做的算比较全面,拿来就能用,所以精简了一下,然后重新打了个包. 为了快速使用插件,在此把步骤列出来. 1.创建空物体,添加L ...
- bzoj 2829 信用卡凸包(凸包)
2829: 信用卡凸包 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 1342 Solved: 577 [Submit][Status][Disc ...
- attribute section的用法
1. gcc的__attribute__编译属性 要了解Linux Kernel代码的分段信息,需要了解一下gcc的__attribute__的编绎属性,__attribute__主要用于改变所声明或 ...
- Python Requests库
背景 Requests is an elegant and simple HTTP library for Python, built for human beings. Requests是一个优雅简 ...
- UNITY打包问题
1,打包有二种,打包可执行程序-player,打包资源包-assetbundle 2,打包player后,在PC平台去看打包后对应的资源大小,发现比原始资源小得多,模型资源压缩率约60%,图资源压缩率 ...
- jquery.qrcode.min.js生成二维码 通过前端实现二维码生成
主体代码: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <tit ...
- PHP面试题三
1.nginx使用哪种网络协议? nginx是应用层 我觉得从下往上的话 传输层用的是tcp/ip 应用层用的是http fastcgi负责调度进程 2. <? echo 'hello tush ...
- SampleManager(赛默飞)
- Cocos2d-js 3.0 alp2 使用指南
Download Cocos2d-JS: http://www.cocos2d-x.org/download Unzip and copy to C:/ Download JDK: http://ww ...