2014-10-30 79 views

回答

0
NSString *imageUrlString = @"http://www.gstatic.com/translate/intl/ru/logo.png"; 
NSString *yourText = @"Some text here"; 

NSString *htmlString = [NSString stringWithFormat:@"<img src='%@'/><br><b>%@</b>", imageUrlString, yourText];  
[myWebView loadHTMLString:htmlString baseURL:nil]; 
1
NSString *imageFileName = @"image"; 
NSString *imageFileExtension = @"png"; 

NSString *imagePath = [[NSBundle mainBundle] pathForResource:imageFileName ofType:imageFileExtension]; 

NSString *imgHTMLTag = [NSString stringWithFormat:@"<img src=\"file://%@\" />", imagePath]; 
+0

我想用NSCahce – 2014-10-30 12:21:58

相關問題