LoginSignup
4
1

More than 5 years have passed since last update.

UITableViewHeaderFooterViewの背景色の指定

Posted at

概要

TableViewで利用するUITableViewHeaderFooterViewの背景色の変更の方法でちょろっとはまったので備忘録

結論

contentViewに設定する。

// NG
self.backgroundColor = .yellow
// OK
self.contentView.backgroundColor = .yellow

UITableViewCellとかと同じでcontentViewを持っているんですね。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1