Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove grey shadow on the top UIWebView when overscroll? [duplicate]

I'm using UIWebView for show a simple HTML page. When I scroll the page (over the top or over the bottom) a shadow gray appears behind!! Can I remove or avoid this bad effect?

Thx

P.S. UIWebView, View container, are all background clear and opaque NO!!

like image 431
Undolog Avatar asked Feb 10 '10 17:02

Undolog


1 Answers

The shadows are of class UIImageView. You can loop through the views of the first subview of UIWebView and just hide any views that match UIImageView.

id scrollview = [webView.subviews objectAtIndex:0];    
for (UIView *subview in [scrollview subviews])
  if ([subview isKindOfClass:[UIImageView class]])
   subview.hidden = YES;

Disclaimer: the view hierarchy could change in the future and this would not work causing the shadows to come back.

like image 99
Adolfo Avatar answered Oct 03 '22 18:10

Adolfo