I am trying to load a javascript file but it does not work.
My code:
NSString * html = [NSString stringWithFormat: @ "& lt; html> gt; & lt; / head & Gt; & lt; body & gt; & lt; script type = \ "text / javascript \" src = \ "http: //mywebsite.com/file.js \" & gt; & lt; / script & gt; & Lt; / body & gt; & lt; / html & gt; "]; [_webView Load HTML String: html baseURL: zero];
This code is supposed to display a video, but nothing happens. This code displays videos properly in desktop browsers, my JS is correct. Use the baseURL in the url
NSURL * base = [ NSURL URLWithString: @ "website.com"];
No comments:
Post a Comment