Guest User

Untitled

a guest
Oct 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. -(void)useCustomBackButton
  2. {
  3. UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
  4. backButton.frame = CGRectMake(0, 0, 63, 44);
  5. [backButton setImage:[UIImage imageNamed:@"Btn_Back"] forState:UIControlStateNormal];
  6. [backButton addTarget:self action:@selector(backButtonPressed) forControlEvents:UIControlEventTouchUpInside];
  7. UIBarButtonItem *backBarButton = [[UIBarButtonItem alloc] initWithCustomView:backButton];
  8.  
  9. self.navigationItem.leftBarButtonItem = backBarButton;
  10.  
  11. [backBarButton release];
  12. }
Add Comment
Please, Sign In to add comment