gpt4 book ai didi

iphone - SSCollectionViewItem 选定状态?

转载 作者:行者123 更新时间:2023-11-29 05:02:48 25 4
gpt4 key购买 nike

我正在使用 SSToolkit 和 SSCollectionView。当我单击 SSCollectionViewItem 时,我想让该项目变暗,以便用户知道它已被按下。

文档 ( http://sstoolk.it/documentation/Classes/SSCollectionViewItem.html ) 显示了 setSelected 和 setHighlighted 方法,但我不确定如何更改项目的外观。

有什么帮助吗?

最佳答案

答案就在文档中:

Discussion

Highlights or unhighlights the item, animating the transition between regular and highlighted state if animated is YES. Highlighting affects the appearance of the items's labels, image, and background.

Note that for highlighting to work properly, you must fetch the item's label (or labels) using the textLabel (and detailTextLabel) properties and set the label's highlightedTextColor property; for images, get the items's image using the imageView property and set the UIImageView object's highlightedImage property.

A custom table item may override this method to make any transitory appearance changes.

SSCollectionViewItem

关于iphone - SSCollectionViewItem 选定状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6472342/

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