Posted By


maxroze on 11/25/10

Tagged


Statistics


Viewed 563 times
Favorited by 0 user(s)

UITabBarItemに画像


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. UIButton *customView = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 5, 5)];
  2. [customView setBackgroundImage:[UIImage imageNamed:@"hoge.png"] forState:UIControlStateNormal];
  3. [customView addTarget:self action:@selector(hogeAction) forControlEvents:UIControlEventTouchUpInside];
  4. UIBarButtonItem* buttonItem = [[UIBarButtonItem alloc] initWithCustomView:customView];
  5. self.navigationItem.rightBarButtonItem = buttonItem;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.