How to load css on UIWebview in tvOS app built using swift(SpriteKit)? -


i creating tvos app using spritekit , unable load css on uiwebview.

let html including css -

let myhtml = "<html>"+"<head>"+"<style type=\"text/css\">"+"@font-face{font-family: myfirstfontb;src: url('\(fontpath)')}"+"</style>"+"<link rel='stylesheet' type='text/css' href='styleipad.css' /></head>"+"<body>"+"<div class='page'>\(value)</div>"+"</body>"+"</html>"

here styleipad.css located in project.

now can load html string uiwebview -

webview?.loadhtmlstring(myhtml, baseurl: bundle.main.bundleurl)

please give bundle url, else css not load.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -