Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uiwebview does not scroll till bottom

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;

}
like image 293
Krunal Avatar asked Jan 27 '26 07:01

Krunal


1 Answers

Remove All line and write only this lines,

_webview.scalesPageToFit=TRUE;
_webview.scrollView.bounces = NO;
like image 120
dhaval Avatar answered Jan 28 '26 22:01

dhaval