gpt4 book ai didi

ios - UICollectionReusableView 标题中的 UIButtons

转载 作者:行者123 更新时间:2023-11-28 21:47:10 26 4
gpt4 key购买 nike

我正在尝试将一些 UIButton 添加到 collectionviews header ,但很难发现按下了哪个 header 。有什么建议吗?

最佳答案

如果您以编程方式添加 UIButtons,最快的方法是向按钮添加带有该部分的标签。

UIButton.tag = x //where x is the section number

然后在 Action 中你可以检查标签。

关于ios - UICollectionReusableView 标题中的 UIButtons,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29681412/

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