UIWebView background color

前端 未结 5 457
不知归路
不知归路 2021-01-31 01:19

I am loading an HTML string into a UIWebView in order to be able to view rich text. So far, so good. But I have one small problem: in my Nib file, I set the background attribute

5条回答
  •  别那么骄傲
    2021-01-31 01:58

    Use this an addition to your code

    [myWebView setBackgroundColor:[UIColor greenColor]];
    [myWebView setOpaque:NO];
    [myWebView loadHTMLString:myString baseURL:nil];
    

提交回复
热议问题