Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Alexander Borsuk
2806153340 [ios] Settings and routing options table headers are visible now in the Dark mode
Signed-off-by: Alexander Borsuk <me@alex.bio>
2022-12-03 14:24:45 +01:00

View file

@ -31,6 +31,25 @@
forCellReuseIdentifier:[MWMTableViewSubtitleCell className]];
}
// Fix table section header font color for all tables, including Setting and Route Options.
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section {
if ([view isKindOfClass: [UITableViewHeaderFooterView class]]) {
UITableViewHeaderFooterView * header = (UITableViewHeaderFooterView *)view;
UIColor * sectionHeaderColor = [UIColor blackSecondaryText];
@try {
// iOS 14+
((UILabel *)[header.contentView valueForKey:@"textLabel"]).textColor = sectionHeaderColor;
} @catch (id ex) {
@try {
// iOS 12 and 13.
((UILabel *)[header valueForKey:@"label"]).textColor = sectionHeaderColor;
} @catch (id ex) {
// A custom header view is used for the table.
}
}
}
}
#pragma mark - Properties
- (BOOL)hasNavigationBar