Ios5 “Operation cannot be completed” when the UIImagePickerController selects a 3gp file and the entire user interface freezes?

The usual video file is "select" and "compress video", enter the callback imagePickerController:didFinishPickingMediaWithInof .

But from the "camera roll" select one 3gp file, perform "Operation cannot be completed" and freeze, do not respond to any input action. In the end, I am forced to close my application.

+3
ios5 uiimagepickercontroller
source share
1 answer

This is due to the choice of a bad video. I got the RID using the code below.

 -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated{ if ([NSStringFromClass(viewController.class) isEqualToString:@"PUUIImageViewController"] == true){ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ if ([[UIApplication sharedApplication].keyWindow isMemberOfClass:[UIWindow class]]){ }else{ //There is a bad video [navigationController popViewControllerAnimated:true]; } }); } 

}

0
source share

All Articles