Created
August 7, 2016 18:34
-
-
Save jeffleeismyhero/14c959425e73ead29bfb4b5b67c8bcca to your computer and use it in GitHub Desktop.
This file contains 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)searchBarCancelButtonClicked:(UISearchBar *)searchBar { | |
[searchBar resignFirstResponder]; | |
[UIView animateWithDuration:0.01f animations:^{ | |
self.searchController.searchBar.alpha = 0.0; | |
} completion:^(BOOL finished) { | |
[self.tableView setContentOffset:CGPointMake(0, self.tableView.contentOffset.y + self.searchController.searchBar.frame.size.height)]; | |
[UIView animateWithDuration:1.0f animations:^ { | |
self.searchController.searchBar.alpha = 1.0; | |
}]; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment