美文网首页
UItabelView头部视图;

UItabelView头部视图;

作者: Mr_Dragonn | 来源:发表于2016-07-11 15:43 被阅读66次

设置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;
    }
    
}

相关文章

网友评论

      本文标题:UItabelView头部视图;

      本文链接:https://www.haomeiwen.com/subject/ayljjttx.html