uiwebview不滚动到底部

Kru*_*nal 3 iphone load uiwebview epub ipad

我是iPad开发人员的新手,

我正在为我的应用程序制作ePub阅读器,我正在加载我的ePub页面 UIWebView

当我加载我的页面时,webview只滚动到一些限制,

这是我的代码片段,

- (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;

}
Run Code Online (Sandbox Code Playgroud)

小智 5

删除所有行并仅写入此行,

_webview.scalesPageToFit=TRUE;
_webview.scrollView.bounces = NO;
Run Code Online (Sandbox Code Playgroud)