davdroman / Bohr

Settings screen composing framework
MIT License
1.26k stars 83 forks source link

Add an option to change the BOTableViewSection appearance #40

Open animaonline opened 8 years ago

animaonline commented 8 years ago

In order to change the background and font colors of a section I need to use this workaround:

- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section{
    // Background color
    view.tintColor = [UIColor blackColor];
    UITableViewHeaderFooterView *header = (UITableViewHeaderFooterView *)view;
    [header.textLabel setTextColor:[UIColor whiteColor]];
}

It should be handled by the appearance proxy.

davdroman commented 8 years ago

The font color of a header/footer can be changed through the headerTitleColor/footerTitleColor properties of each BOTableViewSection and its appearance proxy as well. Background colors can't be changed though, so I guess it'd be worth adding headerBackgroundColor and footerBackgroundColor properties.