首页 > 学院 > 开发设计 > 正文

UiWebView加载PDF文件。

2019-11-09 18:42:40
字体:
来源:转载
供稿:网友
- (void)viewDidLoad {    [super viewDidLoad];    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];    [self.view addSubview:webView];    NSString *path = [[NSBundle mainBundle] pathForResource:@"SDK" ofType:@"pdf"];    NSURL *url = [NSURL fileURLWithPath:path];    NSURLRequest *request = [NSURLRequest requestWithURL:url];    if (request) {        [webView loadRequest:request];    }    }
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表