Tooltip and possibly accessibility scheme for mobile apps

I am working on a new iOS app in JUCE, and I am used to documenting my controls using tooltips. Somewhere I read the idea of using long-press for this on mobile devices, and that should work well for most of my controls. (Performed controls are of course exempt.) My current scheme is to have a global SharedResourcePointer tooltipWindow, and overlaying all of my control surfaces with an invisible Component layer that catches and forwards mouseDown and timing how long the mouse has been down with no intervening Drag or Up using a Timer. When the time reaches a second or so, the tooltip for the widget under the mouse is displayed until a new click happens somewhere.

Does this sound reasonable? Is there a better way to do this, or is it a bad idea for some reason? (I’m new at this domain.)

This basic scheme could also perhaps work for accessibility purposes. The capture rectangle for each widget could be automatically enlarged in the invisible overlay layer so that the set of all controller rectangles would cover the screen completely with no gaps or overlaps, and those rectangles could also be used as alternate control surfaces in “accessibility mode”. (I found the long thread on accessibility in my search for existing long-press tooltip support.)

Using a MouseListener was easier than an invisible Component layer for measuring mouseDown time polled in the MainComponent timerCallback(). Also TooltipWindow was not as convenient as merely popping up labels arranged manually in the Projucer GUI Subcomponents editor. I know long-press tooltips are not standard UI practice for mobile devices, but I think they should be (for non-performed controls).

Hi Jos,

Can you please provide a code example? I’m a bit new to the whole C++/Juce/iOS realm and I’m trying to get a popup balloon for a button after a long press, I’m guessing I can examine the getLengthOfMousePress() mouseEvent method in the mouseUpEvent, but I was hoping to get the popup before the user lift their finger up if possible.