I am implementing a UIWebView. In that I just need to display two images.One is coming from the server path and one is local.If I point the baseURL to server the server image is loading if I change it to Bundle url it is only loading local image. I don't know what is wrong exactly. Please check out my code, and please let me know does I make any mistake.
NSString *absStirng=[[[NSBundle mainBundle] resourceURL] absoluteString];
appendString =[appendString stringByAppendingString:@"<html>"];
appendString =[appendString stringByAppendingString:@"<body>"];
appendString =[appendString stringByAppendingString:@"<a href='/#/'><img src="];
appendString =[appendString stringByAppendingString:absStirng];
appendString =[appendString stringByAppendingString:@"image.png /></a>"];
appendString =[appendString stringByAppendingString:@"<a href='/#/'><img src="];
appendString =[appendString stringByAppendingString:@"image.png /></a>"];
appendString =[appendString stringByAppendingString:@"</body>"];
appendString =[a开发者_如何学GoppendString stringByAppendingString:@"</html>"];
[myWebView loadHTMLString:returnString baseURL:[NSURL URLWithString:@"http://serverUrl/"];
Pass full URL path for remote image.
精彩评论