在一个tableview中创建了SectionHeaderView或者SectionFooterView。但是运行程序的时候在控制台打印了如下log:
[TableView] Setting the background color on UITableViewHeaderFooterView has been deprecated. Please set a custom UIView with your desired background color to the backgroundView property instead.
一、UITableViewHeaderFooterView是由代码创建的
1、创建UIview作为背景,并设置想要的背景颜色
二、UITableViewHeaderFooterView是由Xib创建的
1、创建UIview作为背景,并设置想要的背景颜色 2、把xib中的把backgroundcolor改成default就不会有提示了
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。
我来说两句