Last active
December 26, 2015 13:29
-
-
Save jsai/7158998 to your computer and use it in GitHub Desktop.
Search Bar cancel
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
UISearchBar *searchBar = [[UISearchBar alloc] init]; | |
self.navigationItem.titleView = searchBar; | |
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"cancel", @"Cancel") | |
style:UIBarButtonSystemItemCancel | |
target:self | |
action:@selector(cancelButtonClicked)]; | |
self.navigationItem.rightBarButtonItem = cancelButton; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment