I am trying to call a javascript in a html page using the function -
View did load function
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDo
Simple: You try to execute the JS function from Objective-C before the page even has been loaded.
Implement the UIWebView's delegate method webViewDidFinishLoad: in your UIViewController and in there you call [graphView stringByEvaluatingJavaScriptFromString:@"methodName()"]; to make sure the function gets called after the page has been loaded.