UIDocumentInteractionController 的使用
来源:互联网 发布:淘宝转化手机端链接 编辑:程序博客网 时间:2024/06/06 01:35
听起来好复杂,其实很简单,在你的.h文件中添加UIDocumentInteractionControllerDelegate
documentController.UTI = @"com.microsoft.word.doc"; ifiers.html 可用根据unEncodingURl中的文件后缀名去动态设置这个值
然后在.m文件中,新建一个方法,用来响应你点击按钮弹出时弹出popView,其中会罗列可打开当前文件的其他应用
我的方法如下
-(void)openDocumentIn{
}
其中的 documentController.UTI 表示那些类型的文件支持第三方软件打开,此链接里面有各种类型文件对应的参数https://developer.apple.com/library/mac/#documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentrect 根据自己的需求写
然后delegate里面的方法自己看看应该能明白是什么意思
就不多说了
PS:此法必须使用真机来测试,而且真机测试前最好先下载几个可以支持你所需文件的软件,比如我就安装了WPSOFFICE ,而且,最好做个判断,当读取的可用软件为空时,给用户一个提示,要不然用户会丈二和尚的⋯⋯
0 0
- UIDocumentInteractionController 的使用
- UIDocumentInteractionController 的使用
- UIDocumentInteractionController 的使用
- 本地缓存以及UIDocumentInteractionController的使用
- UIDocumentInteractionController的使用之打开和预览文档
- UIDocumentInteractionController
- (浏览文档)UIDocumentInteractionController打开自己的第三方应用、使用QLPreviewController浏览文档
- iOS 使用UIDocumentInteractionController类打开文件
- UIDocumentInteractionController 调节分享弹窗的size
- 使用第三方APP打开本地文档 (UIDocumentInteractionController)
- 下载文件 ,调用系统的方法(UIDocumentInteractionController) 查看
- UIDocumentInteractionController 第三方应用中打开自己的文件 方法
- iOS UIDocumentInteractionController 设置第三方打开方式的 参数详解
- UIDocumentInteractionController 第三方应用中打开自己的文件 方法
- 8. UIDocumentInteractionController
- iOS 两种预览使用详解(配Demo下载)( Quicklook& UIDocumentInteractionController)
- 在iphone/ipad 上预览阅读服务器端的 PDF not UIDocumentInteractionController
- 利用UIDocumentInteractionController文档预览以及调用iPhone里第三方相关的app打开文档
- (转)C++中extern “C”含义深层探索
- 蓝懿学习之 遇到卡壳的地方了
- Ubuntu网路配置
- 互联网不确定性的传奇故事
- javascript函数参数
- UIDocumentInteractionController 的使用
- 论文档化和架构重要性
- 第3章 对于所有对象都通用的方法
- 短信、邮件群发平台
- linux (CentOS)安装python-tesseract 用于验证码识别
- (4.3.1.13.1) FragmentPagerAdapter刷新fragment最完美解决方案
- Android中的菜单-OptionMenu
- HttpClient4.4 模仿登陆及维持同一session 请求
- CXF-webservice使用记录