It seems a continuous touch is always captured by the control it originated in. Is there a standard way to pass the touch/gesture to the control the touch is currently over?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Controls are presented on screen inside of UIView objects. iOS uses the concept of first responder to handle processing events in hierarchies of UIView objects. When a touch event is sent to a control, the first responder in the chain of responders actually handles that touch.
To have multiple controls share the handling of one touch gesture you could group those controls inside an enclosing view and have the enclosing view handle the event. It can track the updates to the position of the event and figure out which control is currently being touched. It would tell that control to take the appropriate action based on the event. The actual controls would not respond to the event, and iOS would handle passing the event along to the first responder that can handle the event.
In other words, you wouldn’t be passing the event around from control to control, but simulating that passing by handling the event in a view that groups the controls.