NSString *strContent=[info objectForKey:@"newContent"];
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0] ; //根据自己的具体情况设置,我的html文件在document目录,链接也是在这个目录上开始
NSURL *baseUrl = [NSURL fileURLWithPath:documentsDir];
//跟新UI数据
[mywebView loadHTMLString:newContent baseURL:baseUrl];
}
时间: 2024-10-24 11:07:41