Any idea how to call and send parameters to JS function from OBJ-C ??
Lets say in my html I have JS
function showPieChart (parameter1, parameter2) { … }
and from my obj c class in viewDidLoad I want to call this function. Any idea or examples ? Thanks in advance…
Add this in the webViewDidFinishLoad: of the UIWebViewDelegate:
To set a view controller as delegate of a UIWebView, you have to add the
<UIWebViewDelegate>protocol to the@interfaceheader and link the delegate field of the UIWebView to the view controller.If your parameters are inside an array, you can extract them one by one with
[array objectForIndex:i](i being the index for each parameter) or all at once withcomponentsJoinedByString: