UILabel
のテキストセルをカスタムセル内のUICollectionView
に変更しようとしています。私は事のヘアラインの種類を選択下に移動し続けるているいくつかのアプリケーションを見てきましたカスタムUICollectionViewCell内のUILabelのテキストの色を変更
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath)
{
//Change background color of selected Cell
let selectedCell:UICollectionViewCell = collectionView.cellForItemAtIndexPath(indexPath)!
selectedCell.contentView.backgroundColor = UIColor(red: 102/256, green: 255/256, blue: 255/256, alpha: 0.66)
}
func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath)
{
//Set background color of selected Cell to Clear Color
let cellToDeselect:UICollectionViewCell = collectionView.cellForItemAtIndexPath(indexPath)!
cellToDeselect.contentView.backgroundColor = UIColor.clearColor()
}
:現在、私は私がCell
の背景色を変更することができますが、私は唯一のテキストの色を変更する必要があり、次のコードを使用しています細胞。誰も、それを実装する方法を知っていますか?
TIA
ありがとうございました。これはまさに私が必要なものです:) – Molly
あなたは大歓迎です。これが役に立ちましたら、答えとして選択してupvoteしてください。 – Nate4436271