objective c - iOS - How do I perform an action when the user swipes the screen? -
i want shift position of uilabels when user swipes screen--specifically, move them same distance user swiped finger.
how go detecting , implementing this?
thanks
override touchesbegan:withevent
, touchesmoved:withevent:
. keep track of starting location in touchesbegan:withevent
. if repeated calls touchesdragged
(it called while drag happening) show moving fast enough action swipe versus drag, use difference between starting location , current touch location animate changing uilabels.
Comments
Post a Comment