I have to call this method stringByEvaluatingJavaScriptFromString every second to update the UI of an Webview. My UI gets hang for a while when ever the method gets called. The following code snippet didn't solved my problem. Thanks in advance.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[webView stringByEvaluatingJavaScriptFromString:string];
});
});