diff --git a/WordPress-iOS-Shared/Core/WPStyleGuide.h b/WordPress-iOS-Shared/Core/WPStyleGuide.h index 08ef999..1684774 100644 --- a/WordPress-iOS-Shared/Core/WPStyleGuide.h +++ b/WordPress-iOS-Shared/Core/WPStyleGuide.h @@ -69,6 +69,8 @@ + (void)configureTableViewActionCell:(UITableViewCell *)cell; + (void)configureTableViewDestructiveActionCell:(UITableViewCell *)cell; + (void)configureTableViewTextCell:(WPTextFieldTableViewCell *)cell; ++ (void)configureTableViewSectionHeader:(UIView *)header; ++ (void)configureTableViewSectionFooter:(UIView *)footer; // Move to a feature category + (UIColor *)buttonActionColor; diff --git a/WordPress-iOS-Shared/Core/WPStyleGuide.m b/WordPress-iOS-Shared/Core/WPStyleGuide.m index 5856e37..3a23d19 100644 --- a/WordPress-iOS-Shared/Core/WPStyleGuide.m +++ b/WordPress-iOS-Shared/Core/WPStyleGuide.m @@ -413,6 +413,24 @@ + (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]; +} + // TODO: Move to fetaure category + (void)configureFollowButton:(UIButton *)followButton { followButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; diff --git a/WordPress-iOS-Shared/Core/WPTableViewSectionHeaderFooterView.h b/WordPress-iOS-Shared/Core/WPTableViewSectionHeaderFooterView.h index ee430ec..f34b311 100644 --- a/WordPress-iOS-Shared/Core/WPTableViewSectionHeaderFooterView.h +++ b/WordPress-iOS-Shared/Core/WPTableViewSectionHeaderFooterView.h @@ -23,6 +23,7 @@ typedef NS_ENUM(NSInteger, WPTableViewSectionStyle) * should be used app-wide. */ +__deprecated_msg("Use +[WPStyleGuide configureTableViewSectionHeader:] from the table view delegate instead") @interface WPTableViewSectionHeaderFooterView : UITableViewHeaderFooterView @property (nonatomic, assign, readonly) WPTableViewSectionStyle style;