i am new to iPad developer,
i am making ePub reader for my application, in which i am loading my ePub pages in UIWebView
when i load my pages in webview it scrolls unto some limits only,
here is my code snippet,
- (void)viewDidLoad {
...
_webview=[[UIWebView alloc]init];
_webview.frame=CGRectMake(0, 0, 770, 960);
[_webview setBackgroundColor:[UIColor grayColor]];
_webview.delegate=self;
[self.view addSubview:_webview];
[self loadPage];
...
}
- (void)loadPage{
[_webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:_pagesPath]]];
[self._webview sizeToFit];
_webview.scalesPageToFit=TRUE;
_webview.scrollView.bounces = NO;
_webview.autoresizesSubviews = YES;
}
Remove All line and write only this lines,
_webview.scalesPageToFit=TRUE;
_webview.scrollView.bounces = NO;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With