Objective-C Tips & Trick - Prioregroup.com
[Objective-C] UIWebView transparent and scrollbar hidden
       
back

- (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];
                }
            }  
        }   
    }
}






Copyright © 1996-2018 Centro Studi Informatica di Danilo Priore. All rights reserved. P.I.10149810581.
prioregroup.com