iOS loadHtmlString in UIWebView doesn't work with Javascript

后端 未结 3 578
深忆病人
深忆病人 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:28

    By default, xcode will put new Javascript files in Compile Resources instead of Bundle Resources. Click on your project, then on your target. Under 'Build Phases' you may see the Javascript files under 'Compile Sources'. Drag them to down to 'Copy Bundle Resources'.

提交回复
热议问题