Guest User

Untitled

a guest
Jul 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"Custom" style:UIBarButtonItemStyleBordered target:self action:@selector(someSelector)];
  2. self.navigationItem.leftBarButtonItem = btn;
  3. [btn release];
  4.  
  5. - (void)viewDidLoad {
  6. UIBarButtonItem * backButton = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:self action:@selector(backView)];
  7. //navBar is your Navigation Bar
  8. navBar.topItem.leftBarButtonItem = backButton;
  9. }
  10. -(IBAction) backView
  11. {
  12. [self.navigationController popViewControllerAnimated:YES];
  13. }
Add Comment
Please, Sign In to add comment