Using custom fonts in WKWebView

后端 未结 5 563
栀梦
栀梦 2020-11-29 00:15

I\'m using custom fonts in my app. They are copied to bundle and hardcoded to appName-info.plist. This fonts works perfectly in the whole app and in UIWebView.

Im lo

5条回答
  •  迷失自我
    2020-11-29 00:37

    Here is a swift 3 version of @Henrik Hartz awesome answer:

    loadHTMLString(htmlString, baseURL: NSURL.fileURL(withPath: Bundle.main.bundlePath))
    

提交回复
热议问题