views:

252

answers:

2

I have added a custom button (subclass UIButton) to my navigation bar but the button does not change states when clicked.

The button is configured correctly as it does work in, for example, a table view.

All advice is welcome.

A: 

Have you tried subclassing UIBarButton instead of UIButton?

Dan Lorenc
I don't think UIBarButton is a public class in UIKit. It isn't documented in Apple's documentation.
bare_nature
A: 

I got it working. What I forgot to implement was the method to change the button selection states.

bare_nature