Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Change Background of UIWebView Scrolling?

Tags:

iphone

in the iPhone SDK Interface Builder, any UIWebView has a default gray background that is shown when the view has been scrolled too far. Is it possible to change this background color so it doesn't look so obvious? The gray conflicts with my App :( Any help would be greatly appreciated.

like image 486
Zach Smith Avatar asked Feb 05 '10 22:02

Zach Smith


2 Answers

webView.backgroundColor = yourcolor;

You can even do it in IB.

like image 131
Deepak Danduprolu Avatar answered Sep 22 '22 22:09

Deepak Danduprolu


   id scrollView = [[[self yourWebView] subviews] objectAtIndex:0];
   if([scrollView respondsToSelector:@selector(setBackgroundColor:)] )
   {
      [scrollView performSelector:@selector(setBackgroundColor:) 
                       withObject:[UIColor groupTableViewBackgroundColor]];
   }
like image 24
MacTouch Avatar answered Sep 22 '22 22:09

MacTouch