Skip to content

Instantly share code, notes, and snippets.

Last active December 26, 2015 13:29
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jsai/7158998 to your computer and use it in GitHub Desktop.
Search Bar cancel
UISearchBar *searchBar = [[UISearchBar alloc] init];
self.navigationItem.titleView = searchBar;
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"cancel", @"Cancel")
self.navigationItem.rightBarButtonItem = cancelButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment