Skip to content

Instantly share code, notes, and snippets.

@mluton
Created November 19, 2012 23:06
Show Gist options
  • Select an option

  • Save mluton/4114695 to your computer and use it in GitHub Desktop.

Select an option

Save mluton/4114695 to your computer and use it in GitHub Desktop.
Remove Shadow From Web View
// 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