cocoa touch - Handling multiple touches on iPhone -
I am currently developing an app where I have a main view with many subviews. Now I have two specific subviews And I want them to be "touch" only at the same time. So both of them should be able to respond to a touch event but it should not be able to answer that both together, because I have other subviews that should be able to touch at the same time I do not use multitouch or exclusiveTouch property Any thoughts on this? Maybe I can see a single touch region of a group.
Thank you in advance
Paste on a reading-list property, let's call it < Call> Code> View blocked, in your app representative or any other singleton. Make sure you use @property
without non-standard
.
Give an example of a class of two views which the UISponder
approach:
-
After touching,
Check the value of viewBeingTouched
. If this iszero
, then set it toitself
and call the implementation of super otherwise, do not do anything. -
Finally, check the value of
viewBeingTouched
. If it isitself
, then set it to zero.
Get it? To get a touch, the first scene grabs the property and prevents others from registering.
Comments
Post a Comment