I am working on an app where it might be desirable to have a “Vulcan command” available for certain functions. What is the best way to implement this?
The obvious would be to have a view overlaid on top of the entire UI and use it to detect multi touch events. If the touch is in the right places the command is triggered.
I also thought of the idea of placing invisible buttons in the corners of the UI and instructing the user to touch two, three or four corners to activate the function. Can UIButton be used this way? I can see setting up actions to trigger on touch down and then keeping track of which buttons are also pressed. Haven’t tried it yet.
Thanks,
-Martin
This is a job for
UIGestureRecognizer.Specifically, a UILongPressGestureRecognizer set to recognize only multi-finger touches. You can even hit-test each of those touches and make sure they’re within the target regions.