2012-04-15 10 views
0

대신 직사각형으로 변경하고 각 섹션의 네면에 그림자를 추가하고 싶습니다.거기에 그룹화 된 UITableView 각 구역의 위쪽 및 아래쪽 셀에 둥근 된 모서리를 표시하지 않는 방법은 무엇입니까?

할 방법이 있습니까? 나는 각 세포에서 다음과 같은 시도를했지만 나와 함께 작동하지 않는 것 같다.

[cell.layer setCornerRadius:0.0f]; 
[cell.layer setBorderColor:[UIColor clearColor].CGColor]; 
[cell.layer setBorderWidth:1.0f]; 
[cell.layer setShadowColor:[UIColor blackColor].CGColor]; 
[cell.layer setShadowOpacity:0.4f]; 
[cell.layer setShadowRadius:0.8f]; 
[cell.layer setShadowOffset:CGSizeMake(0.8f, 0.8f)]; 

내 코드에 문제가 있습니까?

답변

1

위쪽에 하나, 아래쪽에 하나씩 두 개의 추가 행을 추가하십시오. heightForCellAtIndexPath를 구현하고이 셀의 높이를 0으로 반환합니다.

+0

흥미로운 솔루션! – tom