Skip to content

Instantly share code, notes, and snippets.

@radex
Created January 28, 2015 16:37
Show Gist options
  • Save radex/3dca18290478fc2a036a to your computer and use it in GitHub Desktop.
Save radex/3dca18290478fc2a036a to your computer and use it in GitHub Desktop.
Disables UIWebView's behavior to shift web view on text input focus by intercepting and reversing all scrolling attempts
- (void)disableKeyboardScroll
{
self.webView.scrollView.scrollEnabled = NO;
self.webView.scrollView.delegate = self;
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
self.webView.scrollView.bounds = self.webView.bounds;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment