mikaoj / BSGridCollectionViewLayout

A simple grid collection view layout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for headers and footers

teripaquitinho opened this issue · comments

Hi,

i'm struggling a bit with being able to show a footer and a header for the different sections. Is it even possible? If I add a

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

to my UICollectionViewController it never gets called.

Any suggestions?

Yeah, I didn't need headers for the project where I used this. So they would surprise me if they worked ;)

This seems to be the reason, although I tried to override them but did not really work...

        return nil
    }
    /**
     See UICollectionViewLayout documentation
     */
    public override func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
        return nil
    }