usually when tapping the top of the screen the tableview scrolls all the way to the top. For some reason this doesn’t work in one of my view controllers.
The hirarchy is as follows:
UIView
-> WebView
-> TableView
—–>SearchBar
SearchDisplayController.
I think I have everything hooked up correctly (datasource, delegate, …). I have a similar view controller where everything works. The only difference seems to be WebView, which is missing in the view controller where the tap-and-scroll-to-top works…
Any ideas?
Best regards,
Sascha
You need to disable
scrollsToTopon all but one of the scrollable views. SinceUITableViewis a descendant ofUIScrollView, it’s easy to do. However, if you want to disable it on the webview, it’s a little trickier. This seems to work:But that is a little iffy since it’s poking around in undocumented parts of the webview. It may stop working if Apple decides to rearrange the subviews.