When the user taps the status bar, the scroll view beneath the touch which are closest to the status bar would be Scrolle D to top, if it's ' Scrollstotop ' property is YES, it delegate does not return No. from ' Shouldscrollviewscrolltoto P ', and it isn't already at the top.
On the IPhone, we execute this gesture only if there's one on-screen scroll view with ' scrollstotop ' = = YES. If more than one is found, none would be scrolled.
@property (nonatomic) BOOL scrollstotop; Default is YES.
Setting this property allows the click Status bar not to return to the top, but if we need to get him back to the top, the program does not respond to the action, the workaround
Just above the official document said, only if a host controller has a ScrollView and set this property to Yes, the other scrollview.scrollstotop = NO This will respond to this event, the principle is very simple, if there are 2 ScrollView, The system doesn't know which one you need to scroll to the top.
But
There was really only one uitableview on my page, and I was wondering.
But think about it. Other controls on the page may contain ScrollView.
ScrollView TableView, CollectionView webview all contain ScrollView.
My page is the application of a UIWebView cause the click on the top status bar does not return normally.
Classic case, third-party picture scrolling use more like: Sdcyclescrollview
Once the Sdcyclescrollview is used, it goes back to the top and fails.
Workaround:
Modify the source code, when Uicollectionview *mainview is initiated, add:
// do not use this sentence, will lead to return to the top of the failure
Clicking on the status bar in IOS UITableView cannot roll back to the top