我正在尝试openWithDefaultApplication
在 iPad 上下载文件(存储在应用程序文档目录中)。我安装了PDFReaderLite
,仍然openWithDefaultApplication
没有 rexognizes 扩展pdf
。我该怎么做才能成为PDFReaderLite
打开 pdf 的默认应用程序?
先感谢您
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#openWithDefaultApplication%28%29这表明 openWithDefaultApplication 是一个桌面功能。我认为iOS上甚至不存在默认应用程序功能......
UIButton *button = (UIButton *)sender;
NSURL *URL = [[NSBundle mainBundle] URLForResource:@"file_1" withExtension:@"pdf"];
if (URL) {
// Initialize Document Interaction Controller
self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:URL];
// Configure Document Interaction Controller
[self.documentInteractionController setDelegate:self];
// Present Open In Menu
BOOL flag =[self.documentInteractionController presentOpenInMenuFromRect:[button frame] inView:self.view animated:YES];
if (!flag) {
//[appDel showAlert:@"There is no supported app installed in your phone"];
[self.documentInteractionController presentPreviewAnimated:YES];
}