[英]enabling scroll view scroll to top
I have a scrollview in a subview.How to enable setScrollsToTop
on status bar click? 我在子视图中有一个滚动视图。如何在状态栏上单击以启用
setScrollsToTop
?
I have tried [DetailView.scrollView setScrollsToTop:YES];
我已经尝试过
[DetailView.scrollView setScrollsToTop:YES];
and [scrollview setScrollsToTop:YES];
和
[scrollview setScrollsToTop:YES];
Still doesn't work. 仍然不起作用。 DetailView is my subView.Any ideas??
DetailView是我的subView。有什么想法吗?
iOS automatically decides what to do on status bar click based on several factors - like currently active scroll view to position onscreen to position in the view hierarchy. iOS根据多种因素自动决定对状态栏单击的处理方式-例如当前活动的滚动视图到屏幕上的位置,再到视图层次结构中的位置。
Setting scrollsToTop
only tells iOS that you are OK with this behavior. 设置
scrollsToTop
只会告诉iOS您可以接受此行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.