Created
March 17, 2012 03:08
-
-
Save ryanmcgrath/2054634 to your computer and use it in GitHub Desktop.
Swap this in PhoneGap/Callback iOS apps, stops rubberbanding effects at native level instead of JS crap.
This file contains 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)webViewDidStartLoad:(UIWebView *)theWebView | |
{ | |
for (id subview in theWebView.subviews) | |
if ([[subview class] isSubclassOfClass: [UIScrollView class]]) { | |
((UIScrollView *)subview).bounces = NO; | |
((UIScrollView *)subview).showsVerticalScrollIndicator = NO; | |
} | |
return [ super webViewDidStartLoad:theWebView ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[[subview class] isSubclassOfClass: [UIScrollView class]]
should be written as
[subview isKindOfClass: [UIScrollView class]]