ios5 “The operation could not be conpleted” when U

2019-04-11 06:45发布

Normal video file “choose” and "compressing videos", enter the imagePickerController:didFinishPickingMediaWithInof callback.

But from "camera roll" pick one 3gp file, occur “The operation could not be completed”, and freezing, don't response to any input action. In the end, I am forced to close my app.

1条回答
爷的心禁止访问
2楼-- · 2019-04-11 07:47

This is due to selection of bad video. I got RID with the help of below code.

-(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];
        }
    });
}

}

查看更多
登录 后发表回答