答案 0 :(得分:2)
在WebView中有滚动视图,我们可以根据需要自定义。
UIWebView * webView = [[UIWebView alloc]initWithFrame:self.view.frame];
[self.view addSubview:webView];
UIScrollView *scrollView;
scrollView = webView.scrollView;
scrollView.delegate = self;
还有UIScrollView Delegate 这有助于您保管ScrollView
-(void)scrollViewDidScroll:(UIScrollView *)scrollView1
{
//get refrence of vertical indicator
UIImageView *verticalIndicator = ((UIImageView *)[scrollView.subviews objectAtIndex:(scrollView.subviews.count-1)]);
//set color to vertical indicator
[verticalIndicator setBackgroundColor:[UIColor redColor]];
//get refrence of horizontal indicator
UIImageView *horizontalIndicator = ((UIImageView *)[scrollView.subviews objectAtIndex:(scrollView.subviews.count-2)]);
//set color to horizontal indicator
[horizontalIndicator setBackgroundColor:[UIColor blueColor]];
}