Created
August 1, 2012 12:54
-
-
Save astralbodies/3226628 to your computer and use it in GitHub Desktop.
Scroll to the search bar when tapping the magnifying glass
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
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index | |
{ | |
if (index == 0) { | |
CGRect searchBarFrame = self.searchDisplayController.searchBar.frame; | |
[tableView scrollRectToVisible:searchBarFrame animated:NO]; | |
return -1; | |
} | |
return index; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment