Core Graphics提供了许多原生PDF渲染功能.如果您只想提供一个允许用户平移和缩放PDF的视图,请使用UIWebView; 您所要做的就是为其提供包中PDF的URL,如
NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"my_file" ofType:@"pdf"];
NSURL *url = [NSURL URLWithString:resourcePath];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1525 次 |
| 最近记录: |