只有当一个UIViewController控制器有一个scrollview 并把这个属性设置为yes,
其他的scrollview.scrollsToTop = NO 这样才会响应这个事件,原理很简单,如果有3个scrollview,系统根本不知道你需要哪个滚动到最上面。
比如一个UIViewController中有三个UIView视图,分别为 _pushList, _photoList, _starList,且每个视图中都有一个UITableView,设置如下:
_pushList.table.scrollsToTop = YES;
_photoList.table.scrollsToTop = NO;
_starList.table.scrollsToTop = NO;