gpt4 book ai didi

ios - Collection View 标题在运行时不可见

转载 作者:行者123 更新时间:2023-12-01 16:42:51 25 4
gpt4 key购买 nike

我正在使用股票 Collection View Controller ,并且刚刚在 Storyboard 中启用了标题可重用 View 。

enter image description here

但是,在运行时我看不到那个标题标签。问题是我必须实现一些东西才能看到在 Storyboard 中创建的标签吗?如果不是,什么可能导致它不可见?我可以看到所有单元格的运行时,也可以看到标题可重用 View 占用的空间。然而,它是空的。

最佳答案

你需要实现

collectionView:viewForSupplementaryElementOfKind:atIndexPath:

为了获得剖面 View 。这个方法是collectionView的数据源的一部分

关于ios - Collection View 标题在运行时不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22665022/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com