ios - 如何列出iPhone的pdf文件?

标签 ios objective-c iphone swift pdf

我想在我的应用程序中上传 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/

相关文章:

ios - 从 JSON 中获取字典的值

ios - 如何访问字典数组并在 Objective C 中使用字典对象?

iphone - 如何获取 NSHTTPURLResponse 的状态描述

iphone - 如何创建像iPhone联系人地址单元格一样的UITableViewCell?

iphone - 为相机的每一帧应用一个过滤算法

iphone - 在uiwebview中以Facebook中的登录用户身份搜索用户

iOS – 切换 UIWindow 时的释放问题

ios - 如何从核心数据中删除所有内容(所有 NSObject)?

objective-c - 带有非基础对象的 ARC

iphone - XCode UIView 在 TableView 第一个 Cell 起源之上