美文网首页
解决iOS 15 UITableView SectionHead

解决iOS 15 UITableView SectionHead

作者: 黎先生_ | 来源:发表于2025-01-04 15:01 被阅读0次

解决iOS15以上每个section上方都会多出一片空白问题:
swift的写法:

if #available(iOS 15.0, *) {
    UITableView.appearance().sectionHeaderTopPadding = 0
}

OC的写法:

if #available(iOS 15.0, *) {
    _tableView.sectionHeaderTopPadding = 0
}

相关文章

网友评论

      本文标题:解决iOS 15 UITableView SectionHead

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