开发者

How to Change Background of UIWebView Scrolling?

开发者 https://www.devze.com 2022-12-19 02:56 出处:网络
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 lo

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? Th开发者_StackOverflowe gray conflicts with my App :( Any help would be greatly appreciated.


webView.backgroundColor = yourcolor;

You can even do it in IB.


   id scrollView = [[[self yourWebView] subviews] objectAtIndex:0];
   if([scrollView respondsToSelector:@selector(setBackgroundColor:)] )
   {
      [scrollView performSelector:@selector(setBackgroundColor:) 
                       withObject:[UIColor groupTableViewBackgroundColor]];
   }
0

精彩评论

暂无评论...
验证码 换一张
取 消