Search code examples
objective-cuiwebviewuitableviewxcode4.5

UIWebView display nothing but blank screen


I created a UITableViewCell that contain UIWebView so I can display some bold texts for autocomplete

I tested the code with

-(void) setHTMLContent:(NSString *)HTMLContent
{
    [self.webView loadHTMLString:@"<p><strong>bold</strong><br/><br/> <b>bold</b> </p>" baseURL:nil];
}

The UIWebview shows nothing.


Solution

  • I tried your example in my app, and it outputs twice "bold" as expected, although in color black. So if your background is also black, you won't see anything. Maybe you simply set a different color?