ios - UICollectionView 页眉和页脚 View

标签 ios swift uiview uicollectionview swift2

您好,我想知道我们如何实现这一目标?

UITableView 中我们可以简单地做

tableView.tableHeaderView = SomeView;

tableView.tableFooterView = SomeView;

但我想知道如何为 UICollectionView 做同样的事情。

P.S.:不是节页眉和页脚

最佳答案

UITableView 有全局 header tableHeaderViewtableFooterView,但是 UICollectionView 没有全局 header 所以你会必须使用节标题。

关于ios - UICollectionView 页眉和页脚 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33183290/

相关文章:

swift - SCNView 到 UIView?

ios - 如何在 Storyboard 中查看自定义 UIView 的轮廓?

ios - UITableview 标题隐藏顶部单元格

swift - 使用 Combine 框架的按钮操作

iphone - iPhone 推送通知是通过 HTTP 还是 HTTPS 发送的?

iPhone应用程序录音仅在特定频率以上

iphone - 如何为单个 UIView 提供两个不同的类引用?

swift - 具有外部检测的变异函数要变异的变量

swift - UILabel 文本颜色扩展

ios - 使用第 3 方 OAuth token 在自定义用户数据库中创建用户对象?