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里面写获取图片及跳 ...
随机推荐
- Linux和Windows下的进程管理总结
在Windows和Linux下都可以很方便地列出当前运行的进程.Windows下可以使用组合键CTRL+ALT+DEL打开任务管理器,在进程选项卡中就列举出了当前运行的所有进程,除此之外还可以在命令行 ...
- Unity给力插件之Final IK
Final IK细节: 1.Aim IK:设定一个目标,关节末端始终朝向该目标,一般用来做头部的朝向. 步骤: a.在模型头节点处添加Aim空物体并reset b.给模型添加Aim IK组件,并填上A ...
- (转载)利用burp suite截断上传拿shell
burpsuite上传必须要有filepath这个参数 第一步:选择一个jpg后缀的马. 第二步:设置本地代理,burp的本地端口是8080 第三步:打开burp suite 按图操作就ok了. 第四 ...
- ACM2037
这题采用的是贪心算法,暂不会.
- 学习:Linux基础知识<一>
>>硬盘分区模式 硬盘分区模式一般如下: -- / (根目录) -- /usr (操作系统) --/home (用户信息) -- /var (默认服务器的登录文件,邮件与WW ...
- sql server2008报“评估已过期....."
开始-->所有程序-->Microsoft SQL Server 2008-->配置工具-->SQL Server 安装中心-->维护-->版本升级,接着按照提示一 ...
- linux下无法删除文件的原因
不废话,直接上命令操作.记录备案以后方便查阅 [root@xxxxxxx .ssh]# rm -rf authorized_keys2 rm: 无法删除"authorized_keys2&q ...
- C#目录文件复制、创建操作
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Secu ...
- Android 获取手机总内存和可用内存等信息
在android开发中,有时候我们想获取手机的一些硬件信息,比如android手机的总内存和可用内存大小.这个该如何实现呢? 通过读取文件"/proc/meminfo"的信息能够获 ...
- oracle本月、上月、去年同月第一天最后一天
select trunc(sysdate, 'month') 本月第一天, trunc(last_day(sysdate)) 本月最后一天, trunc(add_month ...