Created
October 25, 2013 23:48
-
-
Save priore/7163549 to your computer and use it in GitHub Desktop.
UIWebView transparent and scrollbar hidden
This file contains hidden or 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)webViewHideBackgroundAndScrollBar:(UIWebView*)theView { | |
| theView.opaque = NO; | |
| theView.backgroundColor = [UIColor clearColor]; | |
| for(UIView *view in theView.subviews) { | |
| if ([view isKindOfClass:[UIImageView class]]) { | |
| // to transparent | |
| [view removeFromSuperview]; | |
| } | |
| if ([view isKindOfClass:[UIScrollView class]]) { | |
| UIScrollView *sView = (UIScrollView *)view; | |
| //to hide Scroller bar | |
| sView.showsVerticalScrollIndicator = NO; | |
| sView.showsHorizontalScrollIndicator = NO; | |
| for (UIView* shadowView in [sView subviews]){ | |
| //to remove shadow | |
| if ([shadowView isKindOfClass:[UIImageView class]]) { | |
| [shadowView setHidden:TRUE]; | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment