I have JS thats called using stringByEvaluatingJavaScriptFromString and takes around 9 seconds to run, but I'd like to be able to cancel this immediately if the user so requires.
It seems however that the entire thread is blocked by this.
I would be prepared to do anything to allow the user to cancel this (e.g. remove the UIWebView ) but nothing seems to work as the app waits for the stringByEvaluatingJavaScriptFromString to return before continuing.