UITableView - change section header color

前端 未结 30 2806
不思量自难忘°
不思量自难忘° 2020-11-27 08:50

How can I change color of a section header in UITableView?

EDIT: The answer provided by DJ-S should be considered for iOS 6 and above. The accepted

30条回答
  •  一整个雨季
    2020-11-27 09:34

    I got message from Xcode through console 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.

    Then I just create a new UIView and lay it as background of HeaderView. Not a good solution but it easy as Xcode said.

提交回复
热议问题