I'm working on an iPhone app, and I want to use a tooltip. I've seen some questions about tooltips for iOS in the past (like this one) where the solution is to use something from cocoa controls, but I'm trying to avoid code I didn't write or don't understand.
Apple does precisely what I want to do in their Music app with a long press:
This looks pretty clearly like a UIMenuController to me. Setting custom text of a UIMenuController has already been answered. How does one stop the pop-up from being selectable? I'm thinking Apple is just intercepting the touch event and dismissing it. That said, I don't know how they're doing that.
Currently, I'm leaving the menu item selectable with an action that is a blank method like so:
UIMenuItem *moreInfo = [[UIMenuItem alloc] initWithTitle:text
action:@selector(doNothing)];
Does anyone have any ideas on how to either:
- intercept the touch event to prevent selection
- accomplish this goal through a completely different means
Thanks