My TableView's header is not displaying well in iOS13. No matter what color I put, it always displays a light gray now...
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section
{ //Section color & style
UITableViewHeaderFooterView *v = (UITableViewHeaderFooterView *)view;
v.backgroundView.alpha = 1;
v.textLabel.textColor = sectionColor;
v.textLabel.font = sectionFont;
v.textLabel.numberOfLines = 1;
v.textLabel.minimumScaleFactor = 0.5;
v.textLabel.adjustsFontSizeToFitWidth = YES;
v.backgroundView.backgroundColor = [UIColor blueColor];
}
It is strange because when I put a stop in the debugger in step by step, it displays me the good image in iOS13, but not in the app:
This works for me.
v.contentView.backgroundColor = .blue
instead of
v.backgroundView.backgroundColor = .blue