UIWebView * d_intro = [[UIWebView alloc] init]; d_intro.delegate = self; d_intro.dataDetectorTypes = UIDataDetectorTypeLink; //取消右侧,下侧滚动条,去处上下滚动边界的黑色背景 d_intro.backgroundColor=[UIColor clearColor]; for (UIView *_aView in [d_intro 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; //上下滚动出边界时的黑色的图片 } } } } [self.view addSubview:d_intro];
时间: 2024-10-12 02:42:49