Skip to content

Commit

Permalink
Accept plain views as section header/footer
Browse files Browse the repository at this point in the history
It makes integration with Swift easier. If the view is not a
UITableViewHeaderFooterView, we don't touch it.
  • Loading branch information
koke committed Dec 17, 2015
1 parent c093eec commit 9882a89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WordPress-iOS-Shared/Core/WPStyleGuide.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
+ (void)configureTableViewActionCell:(UITableViewCell *)cell;
+ (void)configureTableViewDestructiveActionCell:(UITableViewCell *)cell;
+ (void)configureTableViewTextCell:(WPTextFieldTableViewCell *)cell;
+ (void)configureTableViewSectionHeader:(UITableViewHeaderFooterView *)header;
+ (void)configureTableViewSectionFooter:(UITableViewHeaderFooterView *)footer;
+ (void)configureTableViewSectionHeader:(UIView *)header;
+ (void)configureTableViewSectionFooter:(UIView *)footer;

// Move to a feature category
+ (UIColor *)buttonActionColor;
Expand Down
6 changes: 6 additions & 0 deletions WordPress-iOS-Shared/Core/WPStyleGuide.m
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,18 @@ + (void)configureTableViewTextCell:(WPTextFieldTableViewCell *)cell

+ (void)configureTableViewSectionHeader:(UITableViewHeaderFooterView *)header
{
if (![header isKindOfClass:[UITableViewHeaderFooterView class]]) {
return;
}
header.textLabel.font = [self tableviewSectionHeaderFont];
header.textLabel.textColor = [self whisperGrey];
}

+ (void)configureTableViewSectionFooter:(UITableViewHeaderFooterView *)footer
{
if (![footer isKindOfClass:[UITableViewHeaderFooterView class]]) {
return;
}
footer.textLabel.font = [self subtitleFont];
footer.textLabel.textColor = [self greyDarken10];
}
Expand Down

0 comments on commit 9882a89

Please sign in to comment.