나는 그것은 내 사용자 지정 UITableCell 클래스Swift 단일 TableViewCell의 색상을 설정하는 방법은 무엇입니까?
내부의 방법입니다하지만 당신은 GIF 다른 세포에 볼 수도 영향을받습니다
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
}
}
을 시도했다. 이것을 피할 수있는 방법은 인덱스가있는 것만입니다. 3이 착색된다고 가정 해 봅시다.