Tinder like pan iOS

后端 未结 5 842
刺人心
刺人心 2021-01-22 23:24

For the Tinder app in iOS, I assume they are using a pan gesture recognizer on the image view. How is it that another image is shown underneath the image the user has started to

5条回答
  •  礼貌的吻别
    2021-01-22 23:41

    You can create custom class of card with own gesture recognizer and create delegate with methods didSwipeLeft/Right. Delegate will get call back on swiping and move next card to the front. For code reusing you can create universal manager for this cards. You can look at the implementation of card and manager here: https://github.com/Yalantis/Koloda

提交回复
热议问题