问题描述
我知道,当您有多个滚动视图时,setScrollsToTop会感到困惑,但是有什么办法可以解决此问题?您可以指定要滚动到顶部的视图,从而为该属性进行澄清吗?
I know that setScrollsToTop gets confused when you have more than one scrollable view, but is there any way to fix this? Can you specify which view to scroll to top, thus clarifying it for the property?
例如,我在视图中有myScrollView和myTableView
Eg, I have myScrollView and myTableView in the view
如何设置它,以便在轻按状态栏时只有myTableView滚动到顶部?
How can I set it so only myTableView scrolls to top when the status bar is tapped?
或者,点击状态栏时,是否有一条通知会关闭(或者我也可以订阅)?
Alternatively, is there a notification that goes off (or I can subscribe too) when the status bar is tapped?
预先感谢,我希望这是有道理的!
Thanks in advance, I hope this makes sense!
推荐答案
我还发现关闭了所有其他滚动视图的滚动
I also found turning off scrolling for all other scrollviews
例如
[myScrollView setScrollEnabled:NO]
[myScrollView setScrollEnabled:NO]
将使其重新工作.
只需记住根据需要关闭和打开滚动即可.
Just remember to turn scrolling off and on as needed.
这篇关于具有多个UIScrollView类和/或子类的setScrollsToTop(UITableView)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!