Hey fellas,
I've got a custom view inside of a UIBarButtonItem
, set by calling -initWithCustomView
.
OK, so the view renders fine, but when I tap it, it doesn't call the method that I set as the UIBarButtonItem
's action
property.
Oh, and I have verified that my -deselectAll
method works fine.
Keep in mind that I am not using Interface Builder and I am sure that the method signature is correct
Here's my code:
UIImageView *SOCImageView = [[ UIImageView alloc ] initWithImage:[ UIImage imageNamed: @"cancel_wide.png" ] ];
SOItem.leftBarButtonItem = [[ UIBarButtonItem alloc ] initWithCustomView: SOCImageView ];
[ SOCImageView release ];
[ SOItem.leftBarButtonItem setTarget: self ];
[ SOItem.leftBarButtonItem setAction: @selector( deselectAll ) ];
Thanks a million