ios问题bug收录——1

 **[2713:59682] *** Assertion failure in -[MBProgressHUD show:], /Users/lu/Desktop/****/Pods/MBProgressHUD/MBProgressHUD.m:248

 **[2713:59682] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'MBProgressHUD needs to be accessed on the main thread.'

 

'MBProgressHUD needs to be accessed on the main thread.'这个错误主要翻译成,MBProgressHUD必须在主线程上运行。

而我是与js交互之后back回去的。。可见webView加载完毕,与js交互占用的不是主线程????

解决办法 :

     dispatch_async(dispatch_get_main_queue(), {

                self.navigationController!.popViewControllerAnimated(true)

            })

posted @ 2016-05-20 10:07  世界仔  阅读(249)  评论(0编辑  收藏  举报