I have a UITableView within my UIViewController.
I want the table to scroll to the top when the status bar is pressed. i've tried self.tableView.scrollsToTop = YES
but it does not scroll the table to the top.
Any idea on how to make this work?
I have a UITableView within my UIViewController.
I want the table to scroll to the top when the status bar is pressed. i've tried self.tableView.scrollsToTop = YES
but it does not scroll the table to the top.
Any idea on how to make this work?
Looking at the documentation for UIScrollView, scrolls to top, there is a special consideration: "on iPhone, the scroll-to-top gesture has no effect if there is more than one scroll view on-screen that has scrollsToTop set to yes."
This could be part of the issue, without seeing your actual code.
Another technique you might employ since it sounds like a uitableview nested inside a view controller, is to call scrollToRowAtIndexPath:atScrollPosition:animated:
So, detect when status bar is pressed, then call [YourTable scrollToRowAtIndexPath:probably0 atScrollPosition: UITableViewScrollPositionTop animated:YES/NO];