UITableViewHeaderFooterView背景色问题
问题发生
在一个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就不会有提示了
网友评论