iOS loadHtmlString in UIWebView doesn't work with Javascript

后端 未结 3 568
深忆病人
深忆病人 2021-02-15 01:36

I have a iOS app to load a html string which refer to external css file and javascript file in the same directory.

Here is my html file:


&l         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-02-15 02:27

    like the others have said

    • use baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]];

    • copy Bundle Resources and not in Compile Resources.

    thats it!

提交回复
热议问题