(SectionHeaderView 不显示问题)
自己在写UICollectionView的时候 想设置SectionHeaderView的时候。怎么都不显示,layout 的布局也设置了,包括注册 sectionHeaderView
collectionView.register(YMCollectionHeaderView.self, forSupplementaryViewOfKind:UICollectionElementKindSectionHeader, withReuseIdentifier: reusedId)
// section headerView 的高
layout.headerReferenceSize = CGSize(width: SCREENW, height: 100);
最后发现一个版本的问题 , 因为比较懒,代理方法直接是copy的,但是swift3.3 的代理方法已经稍微变化,导致网上的方法不走。
网上方法:
func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: