ios - How to handle multiple touch gesture at a time? -
i have perform gesture on imageview
@ time, means user can move imageview
on single tap @ time on double tap zooming , rotation possible.now found methods perform multiple gesture unable perform zoom , roation.
- (void)touchesbegan:(nsset *)touches withevent:(uievent *)event; - (void)touchesmoved:(nsset *)touches withevent:(uievent *)event; - (void)touchesended:(nsset *)touches withevent:(uievent *)event; - (void)touchescancelled:(nsset *)touches withevent:(uievent *)event
before applied uipinchgesturerecognizer
,uirotationgesturerecognizer
, uipangesturerecognizer
handle 1 gesture @ time.please me solve or give me other better option if possible.
uipinchgesturerecognizer *pinchgesture = ... //initialize pinchgesture.delegate = self; //same rotation gesture //and implement delegate method - (bool)gesturerecognizer:(uigesturerecognizer *)gesturerecognizer shouldrecognizesimultaneouslywithgesturerecognizer:(uigesturerecognizer *)othergesturerecognizer
Comments
Post a Comment