所谓动态Html,指代码中组合生成的html字符串;
若需要加载本地CSS,图片,JS文件,则,
1,需要文件的全路径;
2,需要“file:///”标志;
例如:
//获取文件全路径
NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"M_head@2x" ofType:@"png"];
//代码加载图片
[_mStrHtmlUrl appendFormat:@"<img src=\"file:///%@\" width=[\"40\" height=\"40\"/> \n",imagePath];