Using touchesBegin/Moved/Ended to only affect movement of single
uiimageview on screen despite multi-touch
I have multiple images on screen that are draggable via touch, and
currently I am using touchesBegin:, touchesMoved: and touchesEnded: to
make these images movable. My goal is to allow the user to be able to
select one image on the screen via dragging, but noticed that if multiple
fingers are used, multiple items could be dragged, and thus selected. I
was wondering if there is a way only allow one image to be dragged despite
multiple fingers touch the screen.
As an alternative, I could certainly put up a condition and an alertview
that informs the user only one image could be dragged when it detects
multiple drag, but I was wondering if there is a more elegant solution in
which I could impose some control on what the user could and could not do
right from the touch level.
Thanks!
No comments:
Post a Comment