2011-07-18 58 views

回答

31

使用

cell.textLabel.highlightedTextColor = [UIColor whiteColor]; 
+0

作品在UICollectionView預期爲好。隨着時間的推移,didSelectItemAtIndexPath,shouldSelectItemAtIndexPath等等,我所需要的就是這個。 – DogCoffee

+3

如果你有設置cellselectionstylenone它不會工作 – Rinku

1

覆蓋的方法-(void)setselected:(Bool)flag方法。更改字體

6

這也可以直接在Interface Builder中完成。只需選擇單元格的標題或副標題標籤,翻轉到屬性檢查器中,以及與此控制選擇顏色:

Highlighted color selector in Interface Builder

相關問題