Created
November 19, 2012 23:06
-
-
Save mluton/4114695 to your computer and use it in GitHub Desktop.
Remove Shadow From Web View
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
| // The easy way. iOS 5.x+ | |
| self.webView.scrollView.bounces = NO; | |
| // The hard way. | |
| // Remove the shadow from behind the webview which appears if the web view | |
| // is scrolled past its the top or bottom. | |
| // http://stackoverflow.com/a/4167060/99683 | |
| for (UIView* subView in [webView subviews]) { | |
| if ([subView isKindOfClass:[UIScrollView class]]) { | |
| for (UIView* shadowView in [subView subviews]) { | |
| if ([shadowView isKindOfClass:[UIImageView class]]) { | |
| [shadowView setHidden:YES]; | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment