无法从包中加载HTML格式的图像

时间:2013-12-12 06:55:12

标签: html iphone xcode uiwebview

大家好我发布了2张HTML.One的图片是我从DATABASE得到的HTML,其他是我试图用web替换显示html图像的路径,但我无法加载图片请帮助我。 ...

1)BEFORE

enter image description here

应用此代码后

NSString *html = [[arr objectAtIndex:0] objectForKey:@"Text"];
             NSString *path = [[NSBundle mainBundle] pathForResource:@"Help05" ofType:@".png"];

    NSString *fixedURL = [path stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

NSString * str = [NSString stringWithFormat:@“\”%@ \“”,fixedURL];                 html = [html stringByReplacingOccurrencesOfString:@“ImagePath”withString:str];

2)之后

enter image description here

0 个答案:

没有答案