Why Photos app is NOT showing in the Document Provider extensions on the device?

两盒软妹~` 提交于 2019-12-05 21:27:59

I'm not sure if there is another way natively to do this, but I came up with a solution to add a custom option with handler. I added "Photos" option and in the handler I use UIImagePickerViewController:

 UIDocumentMenuViewController *menuVC = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:UTIs inMode:UIDocumentPickerModeImport];


    [menuVC addOptionWithTitle:@"Photos" image:nil order:UIDocumentMenuOrderFirst handler:^{

        UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];

        imagePickerController.delegate = self;
        [self presentViewController:imagePickerController animated:YES completion:nil];
    }];

I will do the same and add another option for "Camera".

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