Skip to content

Instantly share code, notes, and snippets.

@nfarina
Created July 7, 2010 15:18
Show Gist options
  • Save nfarina/466818 to your computer and use it in GitHub Desktop.
Save nfarina/466818 to your computer and use it in GitHub Desktop.
Hide Shadows from UIWebView
// Removes those unsightly shadows from the top+bottom of your nice webview
@interface UIWebView (HideShadows)
- (void)hideShadows;
- (void)showShadows;
@end
#import "UIWebView+HideShadows.h"
@implementation UIWebView (HideShadows)
void SetImagesHiddenUnder(UIView *view, BOOL hidden) {
for (UIView *subview in view.subviews)
if ([subview isKindOfClass:[UIImageView class]])
subview.hidden = hidden;
else
SetImagesHiddenUnder(subview, hidden);
}
- (void)hideShadows {
SetImagesHiddenUnder(self, YES);
}
- (void) showShadows {
SetImagesHiddenUnder(self, NO);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment