Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong layout #171

Open
alexanderkhitev opened this issue May 4, 2017 · 0 comments
Open

Wrong layout #171

alexanderkhitev opened this issue May 4, 2017 · 0 comments

Comments

@alexanderkhitev
Copy link

alexanderkhitev commented May 4, 2017

Hello! As a thank you for the wonderful framework. I ran into the following problem. I always have to have the left cell bigger, the right one smaller. Behavior works well for the first cells, in the middle already there is a strange behavior, and at the end the layout "breaks". Tell me how can I fix this?

  fileprivate lazy var layout: CHTCollectionViewWaterfallLayout = {
        let layout = CHTCollectionViewWaterfallLayout()
        layout.itemRenderDirection = .chtCollectionViewWaterfallLayoutItemRenderDirectionLeftToRight
        layout.sectionInset = UIEdgeInsets(top: 0, left: 12, bottom: 12, right: 12)
        return layout
    }()
    
    fileprivate lazy var collectionView: UICollectionView = {
        let collection = UICollectionView(frame: .zero, collectionViewLayout: self.layout)
        collection.translatesAutoresizingMaskIntoConstraints = false
        collection.backgroundColor = .white
        return collection
    }()

1
2
3
4
5

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

No branches or pull requests

1 participant