當我按nextButton,這是UIBarButton。然後關聯的動作不執行。按鈕操作沒有響應iphone
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;
哦,感謝它是由錯誤 – 2012-07-06 10:38:28
@IdreesAshraf非常歡迎:)也許你可以接受的答案?謝謝。 – janusbalatbat 2012-07-06 10:40:05