Reputation: 235
I have a view set up as a game controller for an UIImageView on my screen. I have two directional arrows left/right, and an A and B button.
When the user holds a directional (touch down) it moves the player, and on the touch Up method it stops.
However, while holding a directional UIButton, the other UIButtons will not function until you release the touch Up on the directional, thus delaying the tap.
Also, say if you held the A button down and simply tap a directional once, the A button will register the directional button being touched down instead of A, even though A will be in its highlighted state.
I have checked the connections for everything, they are all separate UIButton instances with only those actions linked.
It seems that a touchUp method is being passed to another UIButton instance making two presses at the same time impossible. I have not had issues with this before.
Any help would be appreciated thank you.
Upvotes: 1
Views: 48
Reputation: 17043
Check that multipleTouchEnabled is true for parent views:
multipleTouchEnabled
A Boolean value that indicates whether the receiver handles multi-touch events.
And that exclusiveTouch is false for buttons:
exclusiveTouch
A Boolean value that indicates whether the receiver handles touch events exclusively.
Upvotes: 2