JoniVR / VerticalCardSwiper

A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
MIT License
1.4k stars 101 forks source link

How did horizontal achieve this? #12

Closed ETmanwenhan closed 6 years ago

ETmanwenhan commented 6 years ago

How did horizontal achieve this?

JoniVR commented 6 years ago

Hi @ETmanwenhan

I'm not sure what you're asking? Could you please elaborate on what you mean exactly?

If you mean if it's possible to have horizontal scrolling cards instead of vertical: That's currently not supported and I don't think it will be in the future since it would require a lot of rewriting and would make the code very messy.

There was an issue about this earlier #10 in which I went into some detail and provided a partial implementation on how to do this, I suggest you take a look at that.

If you mean how did I achieve the swiping of the cards to the side then I suggest you take a look at the following files:

These files contain the most important logic for the side swiping.

Hope this helps.

Best regards Joni

ETmanwenhan commented 6 years ago

28d246c9-b25d-4820-8ee9-506a7d1af438 I want to achieve the effect of horizontal scrolling!

JoniVR commented 6 years ago

Alright, then I suggest you either look at issue #10, as I've already talked a lot about this over there.

Or, alternatively, I would suggest something like this: https://github.com/fahidattique55/FAPaginationLayout

Hope this helps 🙂