Skip to content

How do I get parallaxHeaderReferenceSize's Height? #151

@ShawnBaek

Description

@ShawnBaek

I'm always set the parallaxHeaderReferenceSize's height to fixed numbers like "232".

But I want get the parallaxHeaderReferenceSize's height dynamically.

Is there a way to get the parallaxHeaderReferenceSize's height from xib files?

In viewdidload function.

if let layout = self.collectionViewLayout as? CSStickyHeaderFlowLayout {
layout.parallaxHeaderReferenceSize = CGSize(width: self.view.frame.size.width, height: 232)

        layout.parallaxHeaderMinimumReferenceSize = CGSize(width: self.view.frame.size.width, height: 232)
        layout.parallaxHeaderAlwaysOnTop = false
        layout.disableStretching = true
        layout.detachTopLayout = true
    }

after that

Can I update the layout.parallaxHeaderMinimumReferenceSize? in

override func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions