Main Thread Checker: UI API called on a background thread:
Xcode9,iOS11,会出现这个问题。原因就是不在主线程中修改了UI导致crash有2种解决方案解决方案1:在EditScheme里面取消勾选MainThreadCheckerimage解决方案2:把修改UI的代码放回主线程。dispatch_async(dispatch_get_main_queue(),^{//把addSubview,insertSubview,放到这里});