0
我试图Swift如何设置单个TableViewCell的颜色?
if(indexPath.row == colorIndex){
cell.textLabel?.textColor = UIColor.red
}
这
func setup(item: MPMediaItem){
self.textLabel?.text = item.value(forProperty: MPMediaItemPropertyTitle) as? String
if(currentPlayingItem == item){
self.textLabel?.textColor = UIColor.red
}
}
这是我的自定义UITableCell类
内的方法但你可以在GIF其它细胞见也受到影响。我怎样才能避免这个,所以只有索引的那个,比方说3变得有颜色?