UIImage *btnimage = [UIImage imageNamed:@"about.png"];
UIButton *btn = [[UIButton alloc] initWithFrame:self.navigationController.navigationBar.frame];
btn.showsTouchWhenHighlighted = YES;
[btn addTarget:self action:@selector(infoAction:) forControlEvents:UIControlEventTouchUpInside];
[btn setImage:btnimage forState:UIControlStateNormal];
    
UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithCustomView:btn];
[self.navigationItem setRightBarButtonItem:rightBtn];

 

相关文章:

  • 2021-11-20
  • 2021-06-04
  • 2021-05-15
  • 2021-11-06
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2021-02-27
相关资源
相似解决方案