Skip to content

Commit

Permalink
Merge pull request #85 from wordpress-mobile/issue/no-more-WPTableVie…
Browse files Browse the repository at this point in the history
…wSectionHeaderFooterView

Deprecate WPTableViewSectionHeaderFooterView
  • Loading branch information
koke committed Dec 18, 2015
2 parents 7f35e5e + 9882a89 commit 8fe33d0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WordPress-iOS-Shared/Core/WPStyleGuide.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions WordPress-iOS-Shared/Core/WPStyleGuide.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8fe33d0

Please sign in to comment.