I would like to fire an event on touch when a user taps the title of the navigation bar of one of my views.
I’m at a bit of a loss on whether I can access the view of the title of the UINavigationBar in order to wire up a touch event to it.
Is this even possible?
The solution I found is a button, I use the following (but I don’t know how “legal” it is):
Put that bit of code where ever you set your title. Then elsewhere I had this to test:
which logged “Title tap” on the console!
The way I’ve gone about this may be completely wrong, but might give you an idea on what you can look in to. It’s certainly helped me out! There’s probably a better way of doing it though.