ios5 “The operation could not be conpleted” when UIImagePickerController pick a 3gp file, and the whole UI freezed?

荒凉一梦 提交于 2019-12-04 12:40:46

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

}

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!