1
내 UITableView는 아이 패드가 아닌 보이지 않는 헤더/인셋을 가지고 있습니다.ipad tableview에서 보이지 않는 헤더를 제거
내가 시도하는 모든 성공하지,이 원하지 않는 헤더/삽입을 제거하려면 다음을 수행하십시오 ...
- (void)viewDidLoad
{
[super viewDidLoad];
self.tableview.sectionHeaderHeight = 0.f;
self.tableview.sectionFooterHeight = 0.f;
self.tableview.tableHeaderView = nil;
self.tableview.tableFooterView = nil;
self.tableview.contentInset = UIEdgeInsetsZero;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 0.f;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 0.f;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return @"";
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
return [[[UIView alloc] initWithFrame:CGRectNull] autorelease];
}
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
return [[[UIView alloc] initWithFrame:CGRectNull] autorelease];
}
이상한 이유로 'CGRectZero'가 작동하지 않지만! 좋은 발견. – Endareth