zhxnlai / ZLSwipeableView

A simple view for building card like interface inspired by Tinder and Potluck.
MIT License
2.82k stars 330 forks source link

how to smoothly swipe cards programmatically? #25

Open sauron-zh opened 9 years ago

sauron-zh commented 9 years ago

hello, i'm trying to swipe cards programmatically, when i call swipeTopViewToLeft method in a for-loop, my app don't swipe smoothly. i think it is because i call swipeTopViewToLeft method in a very short time, the previous card doesn't finish its animation. so, how can i implement the "swipe programmatically" effect like the gif you post in introduction. really appreciate your reply.

zhxnlai commented 9 years ago

I was pressing the button manually when I made the GIF recording. To achieve the same effect programmatically, you may want to use NSTimer to schedule swipe animations at consecutive time intervals.