3

In my iPhone app I've got the following hierarchy:

UITabBarController ->
 UINavigationController ->
  UIViewController<UIWebViewDelegate> ->
   UIWebView
    (jQuery Mobile-page)

In the UIViewControllers navigationItem, I've added a button whose action selector is the UIWebViews goBack-function. When the button is pressed, everything goes according to plan - the UIWebView navigates backwards (including the fancy jQuery Mobile-transitions).

The problem is that, since jQuery Mobile uses some kind of "internal linking" when navigating to different pages (adding #the/newPage/url.html to the URL), the UIWebViewDelegate function webViewDidStartLoad is never being called when pages within the same jQuery Mobile-driven site are loaded.

Anyone with suggestions on how to make the jQuery Mobile-page fire off the delegate function? Possibly with maintained transitions. If this isn't possible, do anyone have suggestions about any other "web app framework" that is capable of this (delegate calls + transitions)?

Thanks!

UPDATE

Maybe my question is almost the same as this one here on stackoverflow, but I at least think that mine is a bit more specific. If you disagree, leave a comment :)

Community
  • 1
  • 1
Manne W
  • 1,459
  • 4
  • 17
  • 31
  • If the control doesn't react on hashchange, which is how history is simulated in browsers, then you won't be able to trigger anything unles there's a javascript api that the control publishes. – naugtur Feb 13 '11 at 22:19
  • That's what I was afraid of. Anyone that knows if there is any jQuery-(mobile)-function to call to get the current page loaded (including the path after the hash-sign)? By using this I might be able to have a timer call the function and register page changes. – Manne W Feb 15 '11 at 20:15
  • In some sense the controller actually do react to hashchange - but only in the sense that its history is updated. But I don't know if it's really of any help. – Manne W Feb 15 '11 at 20:17
  • Did anyone find a solution to this? It's still a problem as of iOS 5.1 – adamdehaven Jul 24 '12 at 13:25

0 Answers0