2011-11-29 3 views

답변

1

, 단지 tableView.backgroundColor = desiredColor을 말한다. UIColor 클래스는 +blueColor, +redColor 등과 같은 클래스 메소드를 제공합니다. 당신은 테이블과 세포의 동일한 색상을 원하는 경우

, 위의 코드를 유지하고 이것은 당신이보기를 사용하기로 결정한 경우 때문에 단순히 cell.backgroundColor = desiredColor 말보다 더 나은 솔루션입니다 tableView:cellForRowAtIndexPath:

// Customize the cell 
cell.backgroundColor = [UIColor clearColor]; 
for (UIView *subview in [cell subviews]) { 
    subview.backgroundColor = [UIColor clearColor]; 
} 

이 추가 (패턴과 같은) 색상 대신 테이블의 배경으로 배경을 볼 수 있습니다.

+0

@ user1071621 허용되는 답변에 대해 투표하십시오. – aopsfan

0

tableView.backgroundColor = [UIColor yellowColor]

관련 문제