我想在我的应用程序中上传 pdf 文件。
我的问题是我如何获得 pdf 列表?像UIImagepicker
一样,有没有用于文档选择器的 Controller 。
请帮助我。
最佳答案
我认为您正在寻找 UIDocumentMenuViewController .
您可以引用DocumentPickerProgrammingGuide苹果。
你可以这样做,
UIDocumentMenuViewController *myDocumentMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:docArr inMode:UIDocumentPickerModeImport];
myDocumentMenu.delegate = self;
[self presentViewController: myDocumentMenu animated:YES completion: ^{
NSLog(@"presented sucessfullly");
}];
您也可以引用Appcoda's tutorial .
关于ios - 如何列出iPhone的pdf文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38389804/