You get this for free, but you should check that the scrollsToTop
attribute of your UITableView
is YES.
When this does NOT work is when you have a UIScrollView
(or descendant class like UITextView) object embedded inside another UIScrollView
class (like UITableView
). In this case, set scrollsToTop
on the embedded UIScrollView
class to NO. Then the tap-the-status-bar behavior will work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…