Created
June 26, 2013 02:58
-
-
Save cmenscher/5864427 to your computer and use it in GitHub Desktop.
Updated code in CVViewController.m file in Cordova XCode project to disable scrollbars when scrolling.
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
// prevent webView from bouncing | |
// based on the DisallowOverscroll/UIWebViewBounce key in config.xml | |
if (!bounceAllowed) { | |
if ([self.webView respondsToSelector:@selector(scrollView)]) { | |
((UIScrollView*)[self.webView scrollView]).bounces = NO; | |
[((UIScrollView*)[self.webView scrollView]) setShowsHorizontalScrollIndicator:NO]; | |
[((UIScrollView*)[self.webView scrollView]) setShowsVerticalScrollIndicator:NO]; | |
} else { | |
for (id subview in self.webView.subviews) { | |
if ([[subview class] isSubclassOfClass:[UIScrollView class]]) { | |
((UIScrollView*)subview).bounces = NO; | |
[((UIScrollView*)subview) setShowsHorizontalScrollIndicator:NO]; | |
[((UIScrollView*)subview) setShowsVerticalScrollIndicator:NO]; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/questions/821818/is-there-a-way-to-hide-the-scroll-indicators-in-an-uiscrollview