I have a simple iOS app with a single view that contains a UIWebView. Within my webView, I display my jQuery Mobile website.
Since jQuery Mobile loads pages via ajax, the webViewDidStartLoad and webViewDidFinishLoad methods are NOT called once the initial page loads. I've found similar questions on SO such as this one, but I'm not sure where to use the window.location = "localFunction" call, and no one has yet to confirm this actually works.
Here's my issue (example):
- App Starts
shouldStartLoadWithRequestis calledwebViewDidStartLoadis called, and network activity indicator is shown.webViewDidFinishLoadis called, network activity indicator is hidden, and webView displays the initial web page.- User clicks a link from the homepage
shouldStartLoadWithRequestis called- The second page is displayed, but
webViewDidStartLoadandwebViewDidFinishLoadare not called again for the duration of the session.
Is there a way to force jQuery Mobile or the iOS app to call webViewDidStartLoad and webViewDidFinishLoad so that I can do a simple task, such as show a network activity indicator when webViewDidStartLoad is called, and hide it when webViewDidFinishLoad is called?