In my app I’m looking to customise a bar button that currently shows the user’s location so that if the user taps and holds down it shows a subview with some other info. However it seems I can only send one action. Is this definitely the case or is there a way I can have more than one action? I know there’s a subclass to enable the user orientation position (like in the Maps app) – could I somehow implement similar functionality?
Share
UIBarButtonItems only send one event. You’ll need to create your own custom control, add Gesture Recognizers to it to recognize tap and long press, and create a bar button item with your custom control.