当我按下下一个按钮时,它是 UIBarButton。然后不执行相关操作。
UIButton *nextButton1=[UIButton buttonWithType:UIButtonTypeCustom];
[nextButton1 setBackgroundImage:[UIImage imageNamed:@"next.png"] forState:UIControlStateNormal];
[nextButton1 addTarget:self action:@selector(goToItems) forControlEvents:UIControlEventTouchUpOutside];
[nextButton1 sizeToFit];
UIBarButtonItem *nextButton=[[UIBarButtonItem alloc]initWithCustomView:nextButton1];
self.navigationItem.rightBarButtonItem=nextButton;