Ios UIWebView未加载具有复杂javascript结构的本地HTML5资源

Ios UIWebView未加载具有复杂javascript结构的本地HTML5资源,ios,objective-c,html,uiwebview,Ios,Objective C,Html,Uiwebview,UIWebView正在正确加载本地保存的其他普通HTML,但没有加载包含JavaScript结构但不包含任何视频/音频标记的HTML5文件(尽管页面确实包含音频、视频和图像) 也许它会帮助你:)感谢你的帮助@Meera;但我的担心与此有关: UIWebView *web=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; web.ba

UIWebView正在正确加载本地保存的其他普通HTML,但没有加载包含JavaScript结构但不包含任何视频/音频标记的HTML5文件(尽管页面确实包含音频、视频和图像)


也许它会帮助你:)感谢你的帮助@Meera;但我的担心与此有关:
UIWebView *web=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
web.backgroundColor=[UIColor clearColor];
web.opaque=YES;
web.scrollView.bounces=NO;
web.scrollView.showsHorizontalScrollIndicator=NO;
web.scrollView.showsVerticalScrollIndicator=NO;
NSString *path=[[NSBundle mainBundle]bundlePath];
NSURL *baseUrl=[NSURL fileURLWithPath:path];

NSString *html_file_str=[[NSBundle mainBundle]pathForResource:@"index" ofType:@"html"];
NSString *html_str=[NSString stringWithContentsOfFile:html_file_str encoding:NSASCIIStringEncoding error:nil];
[web loadHTMLString:html_str baseURL:baseUrl];
web.delegate=self;
[self.view addSubview:web];