NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:@"pdf"]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [_webView loadRequest:request];
本文共 274 字,大约阅读时间需要 1 分钟。
NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:@"pdf"]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [_webView loadRequest:request];
转载于:https://my.oschina.net/liyang2l/blog/77614