I have an HTML file and JS file in my app. When the web view is loaded I am loading my html file which contains the reference to JavaScript file. I have added the JavaScript file in to my bundle resource for compile sources and in the web view did finish load I am calling a JavaScript function which increases the font size of HTML content but the JavaScript method is not getting called.
This is my code:
NSString *readerstring = @"document.getElementById('reader')";
[webView stringByEvaluatingJavaScriptFromString:[[NSString alloc]initWithFormat:@"adjustFontSize('%@'.contentDocument, '4.0')",readerstring]];
[[NSString alloc] initWithFormat:]you can just do[NSString stringWithFormat:].