标签:io os ar for sp on cti 代码 bs
1.主线程在动画未结束时进行操作可能导致应用崩溃
如下,当dismissViewControllerAnimated:为YES时,由于后续有页面显示,就在应用中导致了崩溃
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
self.decoding = YES;
[picker dismissViewControllerAnimated:NO completion:nil];
__block ZXingWidgetController *tempSelf = self;
tempSelf.imageDecoder = [tempSelf decodeImage:image cropRect:CGRectZero];
}
2.当发现界面未按代码运行进行刷新时,如tableview reloaddata,界面未刷新,可能是因为reloaddata不是在主线程导致
标签:io os ar for sp on cti 代码 bs
原文地址:http://www.cnblogs.com/ldc529/p/4065635.html