I am reloading my UIWebView, and for some reason, the code in stringByEvaluatingJavaScriptFromString does not seem to have an effect. It works great when loading the original image, but doesn't seem to work when rebooting. Coming through the debugger, I see that webViewDidStartLoad is called after a reboot, so there should be another problem.
- (void)webViewDidStartLoad:(UIWebView *)webView
{
[mainWebView stringByEvaluatingJavaScriptFromString:@"var model = {taskId:'xyz', foo:'bar'};"];
}
and my reboot method
- (void)refreshView{
[mainWebView reload];
}
source
share