【发布时间】:2014-02-03 06:39:19
【问题描述】:
有没有办法通过下载到我的 IOS 应用程序中的任何 PDF 编辑器应用程序直接重定向到 IOS 应用程序以显示我的 pdf 文件?
请给我任何建议。
提前致谢。
【问题讨论】:
标签: ios objective-c ipad pdf
有没有办法通过下载到我的 IOS 应用程序中的任何 PDF 编辑器应用程序直接重定向到 IOS 应用程序以显示我的 pdf 文件?
请给我任何建议。
提前致谢。
【问题讨论】:
标签: ios objective-c ipad pdf
检查一下
NSString *stringURL = @"ibooks://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];`
您可以从this link.获得帮助
打开pdf文件的修改代码
#import "ViewController.h"
@interface ViewController ()<UIDocumentInteractionControllerDelegate>
@property (strong, nonatomic) UIDocumentInteractionController *controller;
@end
@implementation ViewController
- (IBAction)openDocument:(id)sender {
NSURL *URL = [[NSBundle mainBundle] URLForResource:@"typo_tips" withExtension:@"pdf"];
self.controller = [UIDocumentInteractionController interactionControllerWithURL:URL];
self.controller.delegate = self;
self.controller.UTI = @"com.adobe.pdf";
[self.controller presentOpenInMenuFromRect:self.view.bounds inView:self.view animated:YES];
}
@end
【讨论】: