ios-UIWebView隐藏右侧下侧滚动条、隐藏边界黑色图片

// 隐藏右侧下侧滚动条、隐藏边界黑色图片
for (UIView *_aView in [self.webView subviews])
    {
        if ([_aView isKindOfClass:[UIScrollView class]])
        {
            [(UIScrollView *)_aView setShowsVerticalScrollIndicator:NO];
            // 隐藏右侧的滚动条
            [(UIScrollView *)_aView setShowsHorizontalScrollIndicator:NO];
            // 隐藏下侧的滚动条
            for (UIView *_inScrollview in _aView.subviews)
            {
                if ([_inScrollview isKindOfClass:[UIImageView class]])
                {
                    _inScrollview.hidden = YES;  // 隐藏上下滚动出边界时的黑色图片
                    
                }
            }
        }
    }
// 避免WebView最下方出现黑线
self.webView.backgroundColor = [UIColor clearColor];
self.webView.opaque = NO;

你可能感兴趣的:(ios-UIWebView隐藏右侧下侧滚动条、隐藏边界黑色图片)