Reputation: 2057
I have some attractive graph which is made in HTML and javascript.
So my questions are:
If yes , How can we pass variable value to html/javascript and how to to accept this value in HTML
Upvotes: 2
Views: 1651
Reputation: 15804
YES .
[webView stringByEvaluatingJavaScriptFromString:function];
shouldStartLoadWithRequest
of your UIwebview.-(BOOL) webView : (UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *) request navigationType : (UIWebViewNavigationType)navigationType {
if ([[[request URL] absoluteString] hasPrefix:@"yourPrefixe:"]) {
//do your works
//then cancel current request
return NO;
}
return YES;
}
Upvotes: 0
Reputation: 50129
NSAttributedString
instancesUIWebView
or WKWebView
Upvotes: 2