CollectionView 设置 头标题

2017-05-26  本文已影响46人  爱喝农药de清凉

注意:
1. CollectionView 的头标题位置 和 他的 滚动 方向 相关
2.一定要 注册 头标题
3. 在初始化Layout 的时候 设置 flowLayout.headerReferenceSize = CGSizeMake(JKScreenWidth, 23);
不然不显示

不多说,直接 上 代码

创建:

pragma mark - 组织成员 CollectionView

}

注册:

pragma mark - 注册

[_memberCollectionView registerClass:[RSMeGroupDetailsCollectionViewCell class] forCellWithReuseIdentifier:croupDetailsIdentifier];

[_memberCollectionView registerClass:[RSMeGroupDetailsCollectionReusableView class] forSupplementaryViewOfKind:@"UICollectionElementKindSectionHeader" withReuseIdentifier:reusableViewIdentifier];

}

代理: 在代理 方法 设置 头视图 或者 脚视图

}

上一篇 下一篇

猜你喜欢

热点阅读