【发布时间】:2010-05-25 11:48:55
【问题描述】:
我从 Daniel Barry http://github.com/danberry/PDF-Viewer 获得了一个 uiwebview 中的 pdf 查看器,它工作得非常好,它显示了一个可以上下滚动的 pdf 文档。
现在我想一次只显示一个页面,并且在 pdf 页面下方还有一个菜单,带有上一个和下一个按钮。任何人都可以帮助新手弄清楚如何? 谢谢!
#import "PDFViewController.h" // PDF View Controller
@implementation PDFViewController
// Synthesize UI Element properties
@synthesize webView;
// Synthesize Variable properties
@synthesize pdfURL;
#pragma mark -
#pragma mark UIViewController methods
- (void)viewDidLoad {
[super viewDidLoad];
pdfURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"stuff pdf" ofType:@"pdf"]];
[webView loadRequest:[NSURLRequest requestWithURL:pdfURL]];
webView.transform = CGAffineTransformScale( webView.transform, 1.00, 1.00 );
}
#pragma mark -
#pragma mark Memory Management
- (void)dealloc {
[webView release];
[pdfURL release];
[super dealloc];
}
@end
【问题讨论】: