Board logo

标题: iOS常见报错 更新 [打印本页]

作者: look_w    时间: 2019-3-14 19:40     标题: iOS常见报错 更新

dismissViewController无效:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x15bd67f0> while a presentation or dismiss is in progress!

    在你使用presentModalViewController加载过多的视图过程中,退出当前视图[self dismissViewControllerAnimated:YEScompletion:nil];或者【self dismissViewControllerAnimated:NO completion:nil];使用如果遇到报这样的警告且返回不到上个视图。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.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [self dismissViewControllerAnimated:NO completion:nil]; });

运行Xcode,一直显示Running 1 of 1 custom shell scripts不动。

[Build][iOS] Building project in Xcode takes for ever in Running 1 of 1 custom shell scripts。

解决办法:在Xcode里面Build Phases里面勾选Run script only when installing。


控制台报错:void SendDelegateMessage(NSInvocation*): delegate (webView:didFinishLoadForFramefailed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode。

解决办法:执行js代码超过了10秒钟,查找js代码中的潜在错误。

JavaScript execution time is limited to 10 seconds for each top-level entry point. If your script executes for more th




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0