- Main Thread Checker: UI API call
- 使用MBProgressHUD 卡顿 报Main Thread
- xcode打印Main Thread Checker: UI A
- Xcode Main Thread Checker
- Main Thread Checker: UI API call
- Main Thread Checker: UI API call
- Main Thread Checker: UI API call
- Main Thread Checker: UI API call
- Main Thread Checker: UI API call
- Main Thread Checker: UI API call

通过堆栈的提示,知道是在子线程中做了一些UI操作。 并且知道是-[CommentNetwordRequest cancelNetword]
中的-[UIApplication setNetworkActivityIndicatorVisible:]
;
找到代码:
- (void)cancelNetword {
[self.urlConnection cancel];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
}
修改为:
- (void)cancelNetword {
[self.urlConnection cancel];
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
});
}
网友评论