Skip to content

Conversation

@Viscmad
Copy link

@Viscmad Viscmad commented Nov 13, 2017

Addition of Vertical Collection View Layout as separate file.

*Renamed to VerticalCollectionViewLayout
*Fixed issue with scrolling to 1st index (line 58 changed)
@filletofish
Copy link
Owner

@Viscmad thank you for the PR! I will take a look asap.

@filletofish
Copy link
Owner

@Viscmad Hi,
Sorry for late response.
I looked at your code and made myself a few changes on top of that. Basically your idea to use height and contentOffset.y is correct! 👍

Feel free to look at it and review.

import UIKit


protocol CardsCollectionViewLayout {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the protocol to constraint different layouts for common interface.


protocol CardsCollectionViewLayout {
var itemSize: CGSize { get set }
var spacing: CGPoint { get set }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CGPoint instead CGFloat to add different spacing for different axis.

@sevgjan
Copy link

sevgjan commented Feb 24, 2020

@filletofish @Viscmad
Is it possible to change the direction of vertical, to scroll/push the cards to bottom, not to top?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants