I\'m trying to change the background color of UITableViewHeaderFooterView. Although the view is appearing, the background color remains the default color. I\'m getting a log
maybe because the backgroundView doesn't exist
override func draw(_ rect: CGRect){ // Drawing code let view = UIView() view.frame = rect self.backgroundView = view self.backgroundView?.backgroundColor = UIColor.yourColorHere }
that work for me.