Tried this but only works for UIButton:
[btn setTarget:self action:@selector(btnClicked:) forControlEvents:UIControlEventTouchUpInside];
Just set the UIBarButtonItem's target and action properties directly.
target
action
2.1m questions
2.1m answers
60 comments
57.0k users