1
동적으로 업데이트하는 UILabels가 포함 된 셀이 포함 된 UICollectionView가 있습니다. 셀을 선택하면 셀의 배경색이 변경되지만 레이블의 텍스트 색도 변경됩니다. 현재 다음 코드를 사용하고 있습니다.Swift의 UICollectionView에서 텍스트 색상 변경
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
cell = collectionView.dequeueReusableCellWithReuseIdentifier("targetCell", forIndexPath: indexPath) as UICollectionViewCell
var label : UILabel = cell.viewWithTag(100) as UILabel
label.textColor = UIColor.whiteColor()
}
그러나 셀을 선택할 때 텍스트 색상이 새 색상으로 업데이트되지 않습니다. 어떤 아이디어?