阅读 44

UITableView自定义头部改变背景色

[TableView] Changing the background color of UITableViewHeaderFooterView is not supported. Use the background view configuration instead.

let backgroundView = UIView(frame: headerView.bounds)
backgroundView.backgroundColor = UIColor.purple
headerView.backgroundView = backgroundView
复制代码

Simulator Screen Shot - iPhone 11 - 2021-10-11 at 20.51.33.png

文章分类
iOS
文章标签