Advertisement
Guest User

Untitled

a guest
Sep 16th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. UIView* buttonView = [[UIView alloc] initWithFrame:CGRectMake(10, 0, 100, 40)];
  2. buttonView.backgroundColor = [UIColor clearColor];
  3.  
  4. backButton = [[UIButton alloc] initWithFrame:CGRectMake(5, 5, 100, 30)];
  5. [backButton setBackgroundImage:[UIImage imageNamed:@"backbutton_100.png"] forState:UIControlStateNormal];
  6. [backButton addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
  7. [backButton setTitle:@" All Customers" forState:UIControlStateNormal];
  8. backButton.titleLabel.font = [UIFont boldSystemFontOfSize:12];
  9. [buttonView addSubview:backButton];
  10.  
  11. UIBarButtonItem* leftButton = [[UIBarButtonItem alloc] initWithCustomView:buttonView];
  12. self.navigationItem.leftBarButtonItem = leftButton;
  13. [leftButton release];
  14.  
  15. [backButton setTitleColor:[UIColor colorWithRed:0.3 green:0.6 blue:0.9 alpha:0.5]
  16. // set 'alpha' to something less than 1. -----^^^
  17. forState:UIControlStateNormal];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement