Do you mean the effect that you get when you touch the button? This property is on UIButton (also available from Interface Builder);
@property(nonatomic) BOOL showsTouchWhenHighlighted
So...
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.showsTouchWhenHighlighted = YES;
If you write a subclass of UIBarButtonItem and put this code there somewhere, it is very simple (and not dirty) to reuse it. I am not sure if there is another way.
source
share