Objective c 如何禁用tableview中的第一节?
我怎样才能去掉第一个分区栏,就在“家”的上方 试试这个:Objective c 如何禁用tableview中的第一节?,objective-c,xcode,uitableview,Objective C,Xcode,Uitableview,我怎样才能去掉第一个分区栏,就在“家”的上方 试试这个: -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ if (section == 0) { return nil; } } 或者这个: - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)sec
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section == 0) {
return nil;
}
}
或者这个:
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
if (section == 0) {
return 0;
}
试试这个:
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
if (section == 0) {
return nil;
}
}
或者这个:
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
if (section == 0) {
return 0;
}
你能给我们看看你的密码吗?具体来说,您的
NumberOfSectionsTableView:
和表格视图:numberOfRowsInSection:
,以及您正在使用的框架(是吗?),能否向我们展示您的代码?具体来说,您的NumberOfSectionsTableView:
和表格视图:numberOfRowsInSection:
,以及您正在使用的框架(是吗?)