Can you tell UIWebView to use a white indicator style?
Starting iOS 5.0 onwards, one can now customize the scrolling behavior of the web view by accessing the 'scrollview' property to achieve the desired functionality:
webView.scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
If you do want to scan the subviews and attempt to gracefully fail if something changes in the future this currently works:
//set a white scroll bar
for (UIView *subview in [webView subviews]) {
if ([subview isKindOfClass:NSClassFromString(@"UIScroller")] || [subview isKindOfClass:NSClassFromString(@"UIScrollView")]) {
if ([subview respondsToSelector:@selector(setIndicatorStyle:)]) {
[(UIScrollView *)subview setIndicatorStyle:UIScrollViewIndicatorStyleWhite];
}
break;
}
}
Though things could still break in the future if setIndicatorStyle: changes to expect a non-enumerated value... but I doubt that would happen.