1、主要是分割开来
//返回几个section
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
//设置标题 可以根据section的值来设置 第一个为0
-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
return @" ";
}
//每个section有多少个cell
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if(section==0){
return 3;
}else{
return 1;
}
}