I have a table view with a search bar on top of it. My requirement is to do not show the search bar when someone open the page but when someone slides the table down then the search bar should be visible.
In your controller's viewDidAppear:
method, set the contentOffset property (in UIScrollView) of your table view to hide the search bar.
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
self.tableView.contentOffset = CGPointMake(0, SEARCH_BAR_HEIGHT);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With