views:

636

answers:

1

I have the following object structure:

  • UITabBarController
    • UINavigationController
      • UITableViewController

It used to work, but then I added the UITabBarController into the mix and made a bunch of other large changes and somewhere in between it stopped.

So far I have:

  • created a new project with that structure, and that seems to work OK.
  • checked that there's only one view with scrollsToTop
  • tried adding a new UITableViewController directly under UITabBarController... still doesn't work.

One thing that might be of use is that -scrollViewShouldScrollToTop: isn't even being called, even though the table view controller's tableView.delegate is set to the controller.

+3  A: 

Just came across this problem myself.

If, like me, you started from the tab bar template Apple provides, then you have to add the following line to applicationDidFinishLaunching: in your app delegate:

[window makeKeyAndVisible];

This one line is what fixed it for me.

Toon Van Acker
Oh man, I love you, I really do :)
Jaka Jančar
Fabulous! Just what the doctor ordered!
Simon