2010-12-12 42 views
0

Je veux montrer une teneur en chaîne HTML local dans un UIWebView en utilisant ceci:UIWebView loadHTMLString: méthode baseURL ne fonctionne pas

[webView loadHTMLString:value baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]]; 

Je ne sais pas ce qui va mal, mais la vue web reste blanc

remercient pour l'aide

+1

pr S'il vous plaît ovide votre code. – Developer

Répondre

1

Essayez cette

NSString *html = [[NSString alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"document" ofType:@"html"]]; [webView loadHTMLString:html baseURL:nil];