UItabelView头部视图;

177 阅读1分钟

设置UItabelView的头部视图:

/**
 *  设置头部视图
 */
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    if (section == 0) {
       return  self.handerView;
    }else{
        return nil;
    }
    
}
/**
 *  设置头部视图的高度
 */
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    
    if (section == 0) {
        return 350;
    }else{
        return 0;
    }
    
}