Iphone UIWebView文本后面的背景颜色变化

Iphone UIWebView文本后面的背景颜色变化,iphone,ios,ipad,Iphone,Ios,Ipad,我有一个UIWebView,在那里我更改了背景图像。但是图像不会在文本后面更改,而是在文本之外显示图像。它只是显示文本后面的白色背景,任何人都可以告诉我如何删除它 self.webview.backgroundColor = [UIColor clearColor]; self.webview.opaque = NO; UIColor *background=[[UIColor alloc]initWithPatternImage:[UIImage imageNa

我有一个
UIWebView
,在那里我更改了背景图像。但是图像不会在文本后面更改,而是在文本之外显示图像。它只是显示文本后面的白色背景,任何人都可以告诉我如何删除它

self.webview.backgroundColor = [UIColor clearColor];
        self.webview.opaque = NO;
        UIColor *background=[[UIColor alloc]initWithPatternImage:[UIImage imageNamed:@"mainbg2_ipad.png"]];
        self.webview.backgroundColor=background;
        self.view.backgroundColor=background;

谢谢你评论这行:
self.webview.backgroundColor=[UIColor clearColor]&然后重试。

尝试此代码

self.webview.opaque = NO;  ///Set YES,just try it 
self.webview.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"mainbg2_ipad.jpeg"]];
self.view.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"mainbg2_ipad.jpeg"]];

UIWebview显示没有文本的空图像。但不显示图像的是文字。它显示为白色。UIWebview显示没有文本的空图像。但不显示图像的是文字。它呈现出白色马库马尔8分钟ago@makumarwebview将显示一个文档,所以背景色在这里没有什么意义。如果要在未加载页面的情况下显示某些内容,请构建一个包含背景的占位符页面;self.webview.backgroundColor=[UIColor clearColor]@马库马尔现在是个惹人厌的家伙??