Reputation: 41622
There are a slew of topics on this site with similar questions, but no matter what I do I cannot get scrollsToTop working in my app:
scrollsToTop=false
in every scrollView subclass except oneMy view structure is complex - childViewControllers, custom headers, etc. I just cannot find any way to get this feature to work.
Upvotes: 0
Views: 98
Reputation: 41622
Well, I have to give credit to a Q&A not on SO for the clue: most every other solution has suggested walking the view hierarchy from the current view down, but this author says to walk if from the window down.
When I did that, I found the culprit: the hidden master view in my UISplitViewController (the app's root view controller) has a table, and that table had scrollsToTop
set to true.
I changed it to false, and voila - now I get a working scrollsToTop
!
Upvotes: 0