diff --git a/MVMCoreUI/Atoms/Views/MFLabel.h b/MVMCoreUI/Atoms/Views/MFLabel.h index d3025b13..c6288c09 100644 --- a/MVMCoreUI/Atoms/Views/MFLabel.h +++ b/MVMCoreUI/Atoms/Views/MFLabel.h @@ -44,11 +44,8 @@ + (nonnull MFLabel *)commonLabelBodyLarge:(BOOL)scale; + (nonnull MFLabel *)commonLabelHeadlineSmall:(BOOL)scale; + (nonnull MFLabel *)commonLabelHeadlineWithSize:(CGFloat)size scale:(BOOL)scale; -+ (nonnull MFLabel *)commonLabelSubheadBold:(BOOL)scale; -+ (nonnull MFLabel *)commonLabelSubheadBoldLarge:(BOOL)scale; + (nonnull MFLabel *)commonLabelFeedHeadline:(BOOL)scale; + (nonnull MFLabel *)commonLabelFeedTitle:(BOOL)scale; -+ (nonnull MFLabel *)commonLabelTopAlert:(BOOL)scale; // Setters + (void)setLabel:(nullable UILabel *)label withHTML:(nullable NSString *)html; @@ -62,15 +59,9 @@ - (void)styleHeadlineSmall:(BOOL)scale; - (void)styleHeadlineWithSize:(CGFloat)size scale:(BOOL)scale; - (void)styleH3:(BOOL)scale; -- (void)styleSubheadBold:(BOOL)scale; -- (void)styleSubheadBoldLarge:(BOOL)scale; - (void)styleB3:(BOOL)scale; - (void)styleFeedHeadline:(BOOL)scale; - (void)styleFeedTitle:(BOOL)scale; - (void)styleB1:(BOOL)scale; -- (void)styleTableRow:(BOOL)scale; - -// Without color -- (void)setFontH1:(BOOL)scale; @end diff --git a/MVMCoreUI/Atoms/Views/MFLabel.m b/MVMCoreUI/Atoms/Views/MFLabel.m index 7b40f0d5..7a02ad78 100644 --- a/MVMCoreUI/Atoms/Views/MFLabel.m +++ b/MVMCoreUI/Atoms/Views/MFLabel.m @@ -153,18 +153,6 @@ return label; } -+ (nonnull MFLabel *)commonLabelSubheadBold:(BOOL)scale { - MFLabel *label = [MFLabel label]; - [label styleSubheadBold:scale]; - return label; -} - -+ (nonnull MFLabel *)commonLabelSubheadBoldLarge:(BOOL)scale { - MFLabel *label = [MFLabel label]; - [label styleSubheadBoldLarge:scale]; - return label; -} - + (nonnull MFLabel *)commonLabelB3:(BOOL)scale { MFLabel *label = [MFLabel label]; [label styleB3:scale]; @@ -189,24 +177,12 @@ return label; } -+ (nonnull MFLabel *)commonLabelFeedTitle:(BOOL)scale { - MFLabel *label = [MFLabel label]; - [label styleFeedTitle:scale]; - return label; -} - + (nonnull MFLabel *)commonLabelB1:(BOOL)scale { MFLabel *label = [MFLabel label]; [label styleB1:scale]; return label; } -+ (nonnull MFLabel *)commonLabelTopAlert:(BOOL)scale { - MFLabel *label = [MFLabel label]; - [label styleTopAlert:scale]; - return label; -} - #pragma mark - Setters + (void)setLabel:(nullable UILabel *)label withHTML:(nullable NSString *)html { @@ -331,17 +307,6 @@ [self setScale:scale]; } -- (void)styleSubheadBold:(BOOL)scale { - [MFStyler styleLabelSubheadBold:self genericScaling:NO]; - [self setScale:scale]; -} - - -- (void)styleSubheadBoldLarge:(BOOL)scale { - [MFStyler styleLabelSubheadBoldLarge:self genericScaling:NO]; - [self setScale:scale]; -} - - (void)styleB3:(BOOL)scale { [MFStyler styleLabelB3:self genericScaling:NO]; [self setScale:scale]; @@ -362,31 +327,11 @@ [self setScale:scale]; } -- (void)styleFeedTitle:(BOOL)scale { - [MFStyler styleFeedCardTitleLabel:self genericScaling:NO]; - [self setScale:scale]; -} - - (void)styleB1:(BOOL)scale { [MFStyler styleLabelB1:self genericScaling:NO]; [self setScale:scale]; } -- (void)styleTableRow:(BOOL)scale { - [MFStyler styleLabelB1:self genericScaling:NO]; - [self setScale:scale]; -} - -- (void)styleTopAlert:(BOOL)scale { - self.font = [MFStyler fontB1:NO]; - [self setScale:scale]; -} - -- (void)setFontH1:(BOOL)scale { - self.font = [MFStyler fontH1:NO]; - [self setScale:scale]; -} - - (void)setAccessibilityTraits:(UIAccessibilityTraits)accessibilityTraits { if (accessibilityTraits& UIAccessibilityTraitHeader) { diff --git a/MVMCoreUI/Styles/MFStyler.h b/MVMCoreUI/Styles/MFStyler.h index eef4125b..d2c02a9a 100644 --- a/MVMCoreUI/Styles/MFStyler.h +++ b/MVMCoreUI/Styles/MFStyler.h @@ -141,10 +141,6 @@ B3 -> Legal + (nullable UIFont *)fontForHeadlineSmall2; //75Bd 32pt + (nullable UIFont *)fontForHeadlineLarge; -//75Bd 14pt -+ (nullable UIFont *)fontForSubheadBold; -//75Md 20pt -+ (nullable UIFont *)fontForSubheadBoldLarge; //55Rg 14pt + (nullable UIFont *)fontforChatText; @@ -194,8 +190,6 @@ B3 -> Legal + (nullable UIFont *)fontForHeadlineSmall2ForWidth:(CGFloat)size; + (nullable UIFont *)fontForHeadlineLarge:(BOOL)genericScaling; + (nullable UIFont *)fontB1ForWidth:(CGFloat)size; -+ (nullable UIFont *)fontForSubheadBold:(BOOL)genericScaling; -+ (nullable UIFont *)fontForSubheadBoldLarge:(BOOL)genericScaling; + (nullable UIFont *)fontForBodyWithSize:(CGFloat)size genericScaling:(BOOL)genericScaling; + (nullable UIFont *)fontB2ForWidth:(CGFloat)size; + (nullable UIFont *)fontForBodyWithSize:(CGFloat)size forWidth:(CGFloat)width; @@ -216,7 +210,6 @@ B3 -> Legal + (nullable UIFont *)fontForSupportQuestionMark:(BOOL)genericScaling; + (nullable UIFont *)fontForSupportDateStamp:(BOOL)genericScaling; + (nullable UIFont *)fontForProgressBarTopLabel:(BOOL)genericScaling; -+ (nullable UIFont *)fontH3:(BOOL)genericScaling; + (nullable UIFont *)fontForLargeLoyaltyHeaderTitle:(BOOL)genericScaling; + (nullable UIFont *)fontForLoyaltyTitleSmall:(BOOL)genericScaling; + (nullable UIFont *)fontForLoyaltyMessage:(BOOL)genericScaling; @@ -263,7 +256,6 @@ B3 -> Legal + (void)styleLabelHeadlineFeed:(nonnull UILabel *)label; + (void)styleLabelFeedMessage:(nonnull UILabel *)label; + (void)styleLabelFeedSubMessage:(nonnull UILabel *)label; -+ (void)styleLabelSubheadBold:(nonnull UILabel *)label; + (void)styleLabelB2:(nonnull UILabel *)label; + (void)styleLabelBodyLarge:(nonnull UILabel *)label; @@ -280,8 +272,6 @@ B3 -> Legal + (void)styleLabelFeedMessage:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; + (void)styleLabelFeedSubMessage:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; + (void)styleLabelH2:(nonnull UILabel *)label size:(CGFloat)size genericScaling:(BOOL)genericScaling; -+ (void)styleLabelSubheadBold:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; -+ (void)styleLabelSubheadBoldLarge:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; + (void)styleLabelBodyLarge:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; + (void)styleFeedCardTitleLabel:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; diff --git a/MVMCoreUI/Styles/MFStyler.m b/MVMCoreUI/Styles/MFStyler.m index 369079c2..ad1aee01 100644 --- a/MVMCoreUI/Styles/MFStyler.m +++ b/MVMCoreUI/Styles/MFStyler.m @@ -227,23 +227,6 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; return [MFFonts mfFont75Bd:pointSize]; } -+ (nullable UIFont *)fontForSubheadBold:(BOOL)genericScaling { - CGFloat size = 14; - if (genericScaling) { - size = [self sizeFontGenericForCurrentDevice:size]; - } - return [MFFonts mfFont75Bd:size]; -} - - -+ (nullable UIFont *)fontForSubheadBoldLarge:(BOOL)genericScaling { - CGFloat size = 20; - if (genericScaling) { - size = [self sizeFontGenericForCurrentDevice:size]; - } - return [MFFonts mfFont75Bd:size]; -} - + (nullable UIFont *)fontB2:(BOOL)genericScaling { CGFloat size = 13; if (genericScaling) { @@ -518,14 +501,6 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; return [self fontForHeadlineLarge:YES]; } -+ (nullable UIFont *)fontForSubheadBold { - return [self fontForSubheadBold:YES]; -} - -+ (nullable UIFont *)fontForSubheadBoldLarge { - return [self fontForSubheadBoldLarge:YES]; -} - + (nullable UIFont *)fontB2 { return [self fontB2:YES]; } @@ -715,11 +690,6 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; label.textColor = [UIColor mfRedColor]; } -+ (void)styleLabelSubheadBold:(nonnull UILabel *)label { - label.font = [MFStyler fontForSubheadBold]; - label.textColor = [UIColor blackColor]; -} - + (void)styleLabelB2:(nonnull UILabel *)label { label.font = [MFStyler fontB2]; label.textColor = [UIColor blackColor]; @@ -735,22 +705,15 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; label.textColor = [UIColor blackColor]; } -+ (void)styleFeedCardTitleLabel:(nonnull UILabel *)label { - label.font = [MFStyler fontForFeedCardTitle]; - label.textColor = [UIColor blackColor]; -} - + (void)styleFeedCardTagLabel:(nonnull UILabel *)label { label.font = [MFStyler fontB3]; label.textColor = [UIColor mfBrownishGrey]; } - + (void)styleStandardSeparatorView:(nonnull UIView *)view { [view setBackgroundColor:[UIColor mfBackgroundGray]]; } - + (void)styleLabelHeadlineSmall:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { label.font = [MFStyler fontForHeadlineSmall:genericScaling]; label.textColor = [UIColor blackColor]; @@ -780,27 +743,11 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; label.textColor = [UIColor mfRedColor]; } -+ (void)styleLabelSubheadBold:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { - label.font = [MFStyler fontForSubheadBold:genericScaling]; - label.textColor = [UIColor blackColor]; -} - -+ (void)styleLabelSubheadBoldLarge:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { - label.font = [MFStyler fontForSubheadBoldLarge:genericScaling]; - label.textColor = [UIColor blackColor]; -} - - + (void)styleLabelBodyLarge:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { label.font = [MFStyler fontForBodyLarge:genericScaling]; label.textColor = [UIColor blackColor]; } -+ (void)styleFeedCardTitleLabel:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { - label.font = [MFStyler fontForFeedCardTitle:genericScaling]; - label.textColor = [UIColor blackColor]; -} - + (void)styleFeedCardTagLabel:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { label.font = [MFStyler fontB3:genericScaling]; label.textColor = [UIColor mfBrownishGrey]; diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h index 08392de6..aab5bd76 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h @@ -33,7 +33,6 @@ + (nonnull UILabel *)label; + (nonnull UILabel *)commonLabelHeadlineLarge; + (nonnull UILabel *)commonLabelHeadlineFeed; -+ (nonnull UILabel *)commonLabelSubheadBold; + (nonnull UILabel *)commonLabelBodyLarge; + (nonnull UILabel *)commonLabelFeedTitle; diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m index 52bff2f7..1feb3e30 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m @@ -77,12 +77,6 @@ static const CGFloat VertialShadowOffset = 6; return label; } -+ (nonnull UILabel *)commonLabelSubheadBold { - UILabel *label = [MVMCoreUICommonViewsUtility label]; - [MFStyler styleLabelSubheadBold:label]; - return label; -} - + (nonnull UILabel *)commonLabelBody { UILabel *label = [MVMCoreUICommonViewsUtility label]; [MFStyler styleLabelB2:label];