Touch the status bar line

I am using UITableView in my application. After scrolling down, if I touch the time of the status bar, the table will be moved up. Any idea how this is done and whether the action can be intercepted. TIA, Jim B

+3
source share
1 answer

UITableView is an extension of UIScrollView, and UITableViewDelegate is an extension of UIScrollViewDelegate.

UIScrollViewDelegate can implement this method:

- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView

This will allow you to intercept it.

You can also simply disable it using the "scrollsToTop" property in the tableview.

If you just want to know when this will happen, you can use this delegate method:

- (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
+3
source

Source: https://habr.com/ru/post/1749126/


All Articles