IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x13f6840e0>
来源:互联网 发布:linux bg 参数 编辑:程序博客网 时间:2024/04/29 19:56
2014-11-25 11:41:49.664xxxx[4745:60b] Warning: Attempt to dismiss from view controller <xxxxxViewController: 0x13f6840e0> while a presentation or dismiss is in progress!
如果使用if (![self.presentedViewController isBeingDismissed]) {
[self dismissViewControllerAnimated:YES completion:nil];
}
没有效果的情况下说明您的当前视图在主线程还没有加载出来,您可能需要使用如下代码
dispatch_after(dispatch_time(DISPATCH_TIME_NOW,
(int64_t)(0.51 *NSEC_PER_SEC)),
dispatch_get_main_queue(), ^{
if (![self.presentedViewControllerisBeingDismissed]) {
[self dismissViewControllerAnimated:YES completion:nil];
}
这样做的好处是让主线程等待0.5秒再退出视图, 就可以退出了!不信您试试!有效的请点赞!
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x13f6840e0>
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x15bd67f0> while a prese
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x15bd67f0> while a prese
- Warning: Attempt to dismiss from view controller <LoginViewController: 0xbb9c0f0> while a presentat
- attempt to dismiss modal view controller
- iOS 跳转出现attempt to dismiss modal view controller whose view does not currently ……的解决方案
- Present/Dismiss Model View Controller
- iOS开发之bug:ios Warning: Attempt to present <a viewController: 0x10d0611b0> on <UITabBarController: 0
- iOS 简单的实现手机号正误的判断(Warning: Attempt to present... whose view is not in the window hierarchy!
- 处理iOS报错: Warning “attempt to present ViewController whose view is not in the window hierarchy”
- iOS - 报错 Warning: Attempt to present <xx: xx> on <xx: xx> whose view is not in the window hierarchy!
- iOS - 解决Warning: Attempt to present <UIImagePickerController: 0x7f9ba106a000>which is already presen
- Warning: Attempt to present错误
- iOS-报错[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
- Warning: Attempt to present <NextViewController: 0x10966fed0> on
- 使用AlertController出现:Warning: Attempt to present <UIAlertController: 0x7a961600>
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- SQL锁表语句
- 客户端会话成功连接至Oracle服务端后,监听的启动和关闭就不会影响已经连接的会话
- DB2 操作无效:已关闭 result set。 ERRORCODE=-4470, SQLSTATE=null
- PL/SQL的存储过程和函数
- 多媒体音视频常用编解码标准介绍
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x13f6840e0>
- Java 中常见的异常和自定义异常
- How to close Magento store for maintenance?
- 13周项目3.。。成绩处理函数版
- I2C通信 读写数据过程
- Oracle 查看表空间的大小和使用情况sql语句
- Andy's First Dictionary 依旧截取
- python 正则表达式
- Android 使用ContentProvider扫描手机中的图片,仿微信显示本地图片效果