I've got an interface that consists of a few UIWebViews, all of which are dynamically fed HTML, infused with MathJax javascript, which are used to display quite a few equations in the window.
The MathJax is stored locally, and gets parsed through the method outlined in this tutorial: http://new2objectivec.blogspot.co.uk/2012/03/tutorial-how-to-setup-mathjax-locally.html
Unfortunately, I'm not adept in javascript, and the MathJax scripts seem to be fed into NSStrings through quite a convoluted process of storing temporary HTML files, and then passing them back into the UIWebViews (outlined in tutorial).
This is confusing me a little, but it works perfectly, albeit with quite a modest loading time (dependent on the amount of equations being loaded).
I wish to know when the MathJax has stopped running and is fully loaded.
I've tried listening to the didFinishLoading method on the delegate to no avail: only gets called a couple of times (per webview), even then the calls are WAY too early. Anyhow, I can't get my head around the few SO questions that ask about checking when javascript has finished loading in a UIWebView.
Placing a temporary loading view up infront of the UIWebViews whilst MathJax is doing its magic would be absolutely perfect, in order to save user confusion. However, as you can probably tell, I'm having a lot of trouble detecting it.
Does anyone have any advice or experience related to working with MathJax/javascript loaded detection in UIWebViews?
Any help is greatly appreciated, as I certainly don't want to rely on arbitrary NSTimers (i.e. 'fake' loading screens).