美文网首页UI
UITableViewStylePlain样式下组头sectio

UITableViewStylePlain样式下组头sectio

作者: 4164fccdcf1c | 来源:发表于2019-06-04 12:01 被阅读0次

一、组头无颜色

- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section {
    UITableViewHeaderFooterView *header = (UITableViewHeaderFooterView *)view;
    header.backgroundView.backgroundColor = UIColor.clearColor;
}

二、组头有颜色

SEL selector = NSSelectorFromString(@"_setHeaderAndFooterViewsFloat:");
((void (*) (id, SEL, BOOL))[self.tableView methodForSelector:selector]) (self.tableView, selector, NO);

相关文章

网友评论

    本文标题:UITableViewStylePlain样式下组头sectio

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