using a UIButton allows me to catch TouchUpInside and TouchUpOutside events to know when the user releases the button with his finger.
UIBarButtonItem doesn't have any events/notifications to be used in this manner.
Does anyone know a nice workaround to know when a UIBarButtonItem is physically released? Is there a way to use an UIButton in a UIToolBar with the same "design" and behavior like a UIBarButtonItem?
Thanks!
IBOutlet UIBarButtonItem *barButton;
....
- (void)viewDidLoad
{
barButton.action = @selector(onBarButtonTap);
....
- (IBAction)onBarButtonTap
{
NSLog( @"BarButton Taped" );
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With