Created
July 7, 2010 15:18
-
-
Save nfarina/466818 to your computer and use it in GitHub Desktop.
Hide Shadows from UIWebView
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
// Removes those unsightly shadows from the top+bottom of your nice webview | |
@interface UIWebView (HideShadows) | |
- (void)hideShadows; | |
- (void)showShadows; | |
@end | |
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
#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