如何设置背景色的UIWebView的iPhone SDK [英] How to set background color for UIWebView in iPhone sdk

查看:112
本文介绍了如何设置背景色的UIWebView的iPhone SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经添加了回地面颜色作为图像的UIWebView但它是来幅视图的背面不向web视图。 Web视图总是在白色的看法,我不能改变它。

I have added the back ground color as an image to uiwebview but it is coming to the back side of web view not to the web view. The web view is always in white colored view, I can't change it.

myView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
myView.autoresizingMask=YES;

webView = [[UIWebView alloc] init];
webView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"BG_Doctor.png"]];

webView.delegate = self;
[myView addSubview:webView];
self.view=myView;

请帮我设置背景色的WebView不回它

Please help me to set the background color to webview not to back of it

推荐答案

[web视图setOpaque:NO];

[webView setOpaque:NO];

这篇关于如何设置背景色的UIWebView的iPhone SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆