0

我正在尝试openWithDefaultApplication在 iPad 上下载文件(存储在应用程序文档目录中)。我安装了PDFReaderLite,仍然openWithDefaultApplication没有 rexognizes 扩展pdf。我该怎么做才能成为PDFReaderLite打开 pdf 的默认应用程序?

先感谢您

4

2 回答 2

1

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#openWithDefaultApplication%28%29这表明 openWithDefaultApplication 是一个桌面功能。我认为iOS上甚至不存在默认应用程序功能......

于 2012-04-05T10:46:26.983 回答
0
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];
        }
于 2014-07-03T09:24:15.597 回答