2017-10-08 2 views
-2

iOS 11의 Health 앱처럼 큰 tableView 헤더를 만들고 싶습니다.이 요소를 빨간색 텍스트로 표시하는 스크린 샷을 추가했습니다. 큰 tableView 헤더를 수행하는 방법?큰 tableView 헤더를 수행하는 방법?

답변

0

녹음되지 않은 데이터는 테이블 뷰 헤더입니다. 당신은 tableview 헤더 viewForHeaderInSection tableview의 사용자 정의 할 수 있습니다. 귀하의 질문은이 링크에서 이미 답변되었습니다. Changing Font Size For UITableView Section Headers

0

tableHeaderView의 frame 속성을 설정하기 만하면됩니다.

0
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 

UILabel *TESTLabel = [[UILabel alloc] init]; 
TESTLabel .frame = CGRectMake(20, 8, 320, 40); 
TESTLabel .font = [UIFont boldSystemFontOfSize:18]; 
TESTLabel .text = [self tableView:tableView titleForHeaderInSection:section]; 

UIView *headerView = [[UIView alloc] init]; 
[headerView addSubview: TESTLabel]; 

return headerView; 
} 

TRY 본

관련 문제