Guest User

Untitled

a guest
Jan 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];
  2.  
  3. [self.navigationItem.leftBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];
  4.  
  5. [self.navigationItem.leftBarButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal];
  6.  
  7. UIButton *useButton = [UIButton buttonWithType:UIButtonTypeCustom];
  8. useButton.frame = CGRectMake(0, 0, 20,17);
  9. useButton.layer.masksToBounds = NO;
  10. useButton.layer.shadowOffset = CGSizeMake(3, 3);
  11. useButton.layer.shadowRadius = 3;
  12. useButton.layer.shadowOpacity = 0.1;
  13. useButton.layer.shadowColor = [UIColor blackColor].CGColor;
  14. useButton.backgroundColor = [UIColor clearColor];
  15. useButton.tintColor = [UIColor whiteColor];
  16. [useButton setImage:[UIImage imageNamed:@"image if any"] forState:0];
  17. [useButton addTarget:self action:@selector(btnBackTapped:) forControlEvents:UIControlEventTouchUpInside];
  18.  
  19. [self.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithCustomView:useButton]];
  20.  
  21. [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor blueColor]} forState:UIControlStateNormal];
  22.  
  23. UIBarButtonItem *rigthBtn = [[UIBarButtonItem alloc] initWithTitle:@"title" style:UIBarButtonItemStylePlain target:self action:@selector(rightBtnTapped:)];
  24.  
  25. [rigthBtn setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} forState:UIControlStateNormal];
  26.  
  27. [self.navigationItem setRightBarButtonItem:rigthBtn];
  28.  
  29. navigationController.navigationBar.tintColor = UIColor.COLOR
Add Comment
Please, Sign In to add comment