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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -