Created
January 28, 2015 16:37
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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