I\'ve read multiple posts on this but it\'s not working properly for me. I\'m using the latest 4.2 SDK.
The code I have is
self.tableView.contentOffset =
You can set the initial bounds of the table view inside viewDidLoad
, so the search bar appears hidden at the beginning.
You have to create the searchBar
property and then use following code:
- (void)viewDidLoad
{
//...
CGRect bounds = self.tableView.bounds;
bounds.origin.y = self.tableView.bounds.origin.y + searchBar.bounds.size.height;
self.tableView.bounds = bounds;
//...
}