2016-09-16 2 views
0

UITableView에서 스타일을 설정하려면 viewForFooterInSection 또는 viewForHeaderInSection과 같은 스타일을 지정하고 싶습니다.UITableView에서 섹션의 UIView를 사용자 정의하는 방법은 무엇입니까?

그것은 추적 할 수없는 가망입니다 그렇게 ... 난 단지 heightForHeaderInSection를 사용하여 titleForHeaderInSection와 높이를 사용하여 제목을 설정할 수 있습니다하지만 난 baground에 색상, 글꼴 크기, 글꼴 색 등을 설정하려면?

+0

예, UIView를 만들고 'viewForHeaderInSection'을 구현 한 다음보기를 반환하십시오. –

+0

섹션 머리글과 바닥 글에 대한보기를 원하는대로 할 수 있습니다. 어떤 문제가 있는지 명확히하십시오. 귀하의 질문은 명확하지 않습니다. – rmaddy

+0

중복됨 : http://stackoverflow.com/questions/15611374/customize-uitableview-header-section?rq=1 – iDevzilla

답변

0

사과로 제공하는 위임 방법으로 할 수 있습니다.

//for header 
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 
{ 
    UIView *myview = [[UIView alloc] init]; 
    //give size for veiw, background color, add label anything here 



    return myview; 
} 


//for footer 

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section 
{ 
    UIView *myview = [[UIView alloc] init]; 
    //give size for veiw, background color, add label anything here 



    return myview; 
} 
관련 문제