Skip to content

Instantly share code, notes, and snippets.

@darkseed
Created April 6, 2011 23:12
Show Gist options
  • Save darkseed/906735 to your computer and use it in GitHub Desktop.
Save darkseed/906735 to your computer and use it in GitHub Desktop.
/*
Add a UISearchBar IBOutlet to your table view controller
Add a search bar to your xib file with Interface Builder by dragging it into the table view
Connect the search bar to it’s outlet
Change the table view’s bounds property to hide the search bar (see code below)
 
*/
 
-(void)viewDidLoad{
[super viewDidLoad];
CGRect bounds = self.tableView.bounds;
bounds.origin.y = bounds.origin.y + searchBar.bounds.size.height;
self.tableView.bounds = bounds;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment