Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove the shadow from the about screen #2

Open
wants to merge 1 commit into from

1 participant

@markrickert

when pulling past the top or bottom and activating the "elastic" effect.

Makes it look a lot cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 26, 2012
  1. @markrickert

    Remove the shadow from the about screen when pulling past the top or …

    markrickert authored
    …bottom and activating the "elastic" effect.
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +15 −0 Classes/en.lproj/AboutViewController.m
View
15 Classes/en.lproj/AboutViewController.m
@@ -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;
}
}
Something went wrong with that request. Please try again.