UIWebView loadHTMLString shows blank screen

前端 未结 3 865
一向
一向 2021-02-07 04:52

I have a strange problem with UIWebView\'s loadHTMLString, where it would only display a blank view when I called loadHTMLString with my content HTML string. It does not matter

3条回答
  •  醉话见心
    2021-02-07 04:54

    I just had the same problem, and being a n00b, i found myself surprised that the problem was solved when i DID NOT DO

    webview = [[UIWebView alloc]init];
    

    but instead, since it was already wired up as an outlet, i just had to call

    [webView loadHTMLString:mystring baseURL:nil];
    

提交回复
热议问题