Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove the shadow from the about screen when pulling past the top or …
…bottom and activating the "elastic" effect.
  • Loading branch information
markrickert committed Apr 26, 2012
1 parent 673d1e9 commit af8ed54
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Classes/en.lproj/AboutViewController.m
Expand Up @@ -41,6 +41,21 @@ - (void)viewDidLoad
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
[webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:baseURL];

//Remove the shadow from the webview.
//Code from https://github.com/markrickert/UIWebView-RemoveShadow
for(UIScrollView* webScrollView in [webView subviews]) {
if ([webScrollView isKindOfClass:[UIScrollView class]]) {
for(UIView* subview in [webScrollView subviews]) {
if ([subview isKindOfClass:[UIImageView class]]) {
((UIImageView*)subview).image = nil;
subview.backgroundColor = [UIColor clearColor];
}
}
}
}
webView.backgroundColor = [UIColor clearColor];
webView.opaque = NO;
}
}

Expand Down

0 comments on commit af8ed54

Please sign in to comment.