I want my sections in the UICollectionView
to have a header with an image.
I have followed these steps:
There is the swift version :
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
let size = CGSize(width: 400, height: 50)
return size
}
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize {
let size = CGSize(width: 400, height: 50)
return size
}
XCode (version 7.3.1 ) does not propose these methods in autocomplete !
If you just want a header, just keep the header method.