在iOS开发中 ,有一个非常基础的功能就是用户点击屏幕顶部状态栏的时候, tableView会自动会滚到第一行.
其实这个很简单 , 就是系统对的一个属性scrollToTop .系统默认的这个属性的值是YES.
// When the user taps the status bar, the scroll view beneath the touch which is closest to the status bar will be scrolled to top, but only if its `scrollsToTop` property is YES, its delegate does not return NO from `shouldScrollViewScrollToTop`, and it is not already at the top.
// On iPhone, we execute this gesture only if there's one on-screen scroll view with `scrollsToTop` == YES. If more than one is found, none will be scrolled.
@property(nonatomic)BOOL