Created
March 28, 2012 15:03
-
-
Save FlaviuSim/2226909 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)scrollViewDidScroll:(UIScrollView *)scrollView | |
{ | |
// get the table and search bar bounds | |
CGRect tableBounds = self.tableView.bounds; | |
CGRect searchBarFrame = self.searchBar.frame; | |
// make sure the search bar stays at the table's original x and y as the content moves | |
self.searchBar.frame = CGRectMake(tableBounds.origin.x, | |
tableBounds.origin.y, | |
searchBarFrame.size.width, | |
searchBarFrame.size.height | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment