PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > 开发编程 > iOS开发教程 > 正文

    设置分区头部底部间距

    作者:张志勇来源:原创浏览:时间:2020-09-30 00:07:50我要评论
    导读:- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return 10;}- (UIView *)tableVi...
    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

    {

        return 10;

    }

    - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

    {

        UIView *view=[[UIView alloc] initWith :CGRectMake(0, 0, kScreenWidth, 10)];

        view.backgroundColor = [UIColor clearColor];

        return view;

    }

    - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section

    {

        return 1;

    }

    - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section

    {

        UIView *view=[[UIView alloc] initWith :CGRectMake(0, 0, kScreenWidth, 10)];

        view.backgroundColor = [UIColor clearColor];

        return view;

    }

    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-155-6003-1.html
    相关热词搜索:
    下一篇:设置斜体字