Created
April 24, 2012 09:02
-
-
Save guange2015/2478082 to your computer and use it in GitHub Desktop.
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[webView setBackgroundColor:[UIColor clearColor]]; | |
[self hideGradientBackground:webView]; | |
[webView loadHTMLString:@"This is a completely transparent UIWebView. Notice the missing gradient at the top and bottom as you scroll up and down." baseURL:nil]; | |
} | |
- (void) hideGradientBackground:(UIView*)theView | |
{ | |
for (UIView * subview in theView.subviews) | |
{ | |
if ([subview isKindOfClass:[UIImageView class]]) | |
subview.hidden = YES; | |
[self hideGradientBackground:subview]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment