小编Nur*_* II的帖子

TableView部分分隔线

我想在表格视图部分添加分隔线.目前,标题部分视图的代码将是:

- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section {
    // recast your view as a UITableViewHeaderFooterView
    UITableViewHeaderFooterView *header = (UITableViewHeaderFooterView *)view;
    header.backgroundView.backgroundColor = [UIColor clearColor];
    header.textLabel.textColor = [UIColor blackColor];
    [header.textLabel setFont:[UIFont fontWithName:@"Rubik-Regular" size:15.0]];

}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

xcode objective-c uitableview ios

3
推荐指数
2
解决办法
8096
查看次数

标签 统计

ios ×1

objective-c ×1

uitableview ×1

xcode ×1