UIWebView without the background shadows

If you ever asked yourself how to display full transparent UIWebView instance without the background shadows (ones that appear when scrolling UIWebView instance up and down) here is the solution. Its one line of code type solution. Well, first I must warn you that this is not documented anywhere. This may change in the future and for the same reason its really not wise to implement this in your app. However, it is your choice and you risk.

UIWebView *yourWebView = ...
for (int i = 0; i < 10; i++) [[[[[yourWebView subviews] objectAtIndex:0] subviews] objectAtIndex:i] setHidden:YES];

Leave a Reply

Your email address will not be published. Required fields are marked *