What is the difference between Pan and Swipe in iOS?

后端 未结 4 798
半阙折子戏
半阙折子戏 2020-11-28 02:41

Sounds simple .. Hold the Trackpad, move the finger, release .. But somehow swipe is not being triggered (pan is triggered instead)

UISwipeG         


        
4条回答
  •  庸人自扰
    2020-11-28 03:30

    Swipe Gesture will work when you drag your finger only in certain directions (swipe up,swipe down,swipe left, swipe right). For example swipeable cells in table view controller.

    Pan Gesture will work when you drag your finger in any directions. You can give acceleration or deceleration to it. FOr example, moving a object from one place to another place or spinning a spinner..

提交回复
热议问题