I have a webview which is scrolling as desired underneath a navigation bar.
However, when I first load the controller, the page loaded in the webview is scrolled so that
My solution:
- (void)loadView { ... _offsetSet = NO; } - (void) viewDidLayoutSubviews { if (!_offsetSet) { [_webView.scrollView setContentOffset:CGPointMake(0, -self.topLayoutGuide.length) animated:NO]; } } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; _offsetSet = YES; }