Hello,
I have a UIToolbar filled with 5 UIBarButtonItems.
For the UIBarButtonItems, I am using a custom view like this:
Code:
button = [[UIBarButtonItem alloc] initWithCustomView:[[UIImageView alloc] initWithImage:image]];
button.action = @selector(myaction);
button.target = self;
The problem is, clicking on this button doesn't trigger
myaction.
How do you use a custom view for UIBarButtonItem and make action work?
Or yet even better, is there a way to do
initWithImage for UIBarButtonItem without losing original colors?