MBProgressHUD 的crash down

大兔子大兔子 提交于 2019-12-26 18:43:39

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

crash:

*** Assertion failure in -[MBProgressHUD show:], /Users/zhongqihulian/Desktop/projectName/qihaoduobao/Pods/MBProgressHUD/MBProgressHUD.m:248

2016-04-14 10:35:40.071 qihaoduobao[1106:259596] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'MBProgressHUD needs to be accessed on the main thread.'

*** First throw call stack:

(0x1823e5900 0x181a53f80 0x1823e57d0 0x182d5899c 0x1002537c8 0x100252530 0x10017cb90 0x1000de1f8 0x1004d3e2c 0x100f45bf0 0x100f45bb0 0x100f54e10 0x100f544d8 0x18204d470 0x18204d020)

libc++abi.dylib: terminating with uncaught exception of type NSException

问题: 

  MBProgressHUD needs to be accessed on the main thread 

  MBProgressHUD 要在主线程里访问

问题锁定:

MBProgressHUD 的方法不要写在分线程中


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!