具有多个UIScrollView类和/或子类的setScrollsToTop(UITableView) [英] setScrollsToTop with multiple UIScrollView classes and/or subclasses(UITableView)

查看:80
本文介绍了具有多个UIScrollView类和/或子类的setScrollsToTop(UITableView)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,当您有多个滚动视图时,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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆