I have the following object structure:
- UITabBarController
- UINavigationController
- UITableViewController
- UINavigationController
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.
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:
This one line is what fixed it for me.