Chinaunix首页 | 论坛 | 博客
  • 博客访问: 533561
  • 博文数量: 78
  • 博客积分: 1913
  • 博客等级: 上尉
  • 技术积分: 829
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-14 21:29
文章分类

全部博文(78)

文章存档

2011年(27)

2010年(26)

2009年(20)

2008年(5)

我的朋友

分类: LINUX

2011-07-21 10:15:00

Nava's solution crashes with an unrecognized selector exception. In fact, setDrawsBackground is not mentioned anywhere in the iOS SDK (perhaps this is available on the Mac?).

Instead, I recommend:

webView.opaque = NO;
webView
.backgroundColor = [UIColor clearColor];

(for some reason it didn't work to set those properties via IB) and include this into your HTML code:

style="background-color: transparent;">
阅读(744) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

windflush2011-09-01 22:10:37

其实最关键的还是网页的这句:
<body style="background-color: transparent;">

只设置opaque有时候渲染会有问题的。