diff --git a/MVMCoreUI/Atoms/Views/MFLabel.h b/MVMCoreUI/Atoms/Views/MFLabel.h index 7a73e1df..f6dd14e1 100644 --- a/MVMCoreUI/Atoms/Views/MFLabel.h +++ b/MVMCoreUI/Atoms/Views/MFLabel.h @@ -35,14 +35,14 @@ + (nonnull MFLabel *)commonLabelH2:(BOOL)scale; //75Bd 18pt + (nonnull MFLabel *)commonLabelH3:(BOOL)scale; +//75Bd 32pt ++ (nonnull MFLabel *)commonLabelH32:(BOOL)scale; //75Bd 13pt + (nonnull MFLabel *)commonLabelB1:(BOOL)scale; //55Rg 13pt + (nonnull MFLabel *)commonLabelB2:(BOOL)scale; //55Rg 11pt gray + (nonnull MFLabel *)commonLabelB3:(BOOL)scale; -//75Bd 32pt -+ (nonnull MFLabel *)commonLabelFeedHeadline:(BOOL)scale; //55Rg 20pt + (nonnull MFLabel *)commonLabelFeedMessage:(BOOL)scale; @@ -56,10 +56,10 @@ - (void)styleH1:(BOOL)scale; - (void)styleH2:(BOOL)scale; - (void)styleH3:(BOOL)scale; +- (void)styleH32:(BOOL)scale; - (void)styleB1:(BOOL)scale; - (void)styleB2:(BOOL)scale; - (void)styleB3:(BOOL)scale; -- (void)styleFeedHeadline:(BOOL)scale; - (void)styleFeedMessage:(BOOL)scale; @end diff --git a/MVMCoreUI/Atoms/Views/MFLabel.m b/MVMCoreUI/Atoms/Views/MFLabel.m index 0bf52d22..0f57c944 100644 --- a/MVMCoreUI/Atoms/Views/MFLabel.m +++ b/MVMCoreUI/Atoms/Views/MFLabel.m @@ -125,6 +125,11 @@ [label styleH3:scale]; return label; } ++ (nonnull MFLabel *)commonLabelH32:(BOOL)scale { + MFLabel *label = [MFLabel label]; + [label styleH32:scale]; + return label; +} + (nonnull MFLabel *)commonLabelB1:(BOOL)scale { MFLabel *label = [MFLabel label]; @@ -144,12 +149,6 @@ return label; } -+ (nonnull MFLabel *)commonLabelFeedHeadline:(BOOL)scale { - MFLabel *label = [MFLabel label]; - [label styleFeedHeadline:scale]; - return label; -} - + (nonnull MFLabel *)commonLabelFeedMessage:(BOOL)scale { MFLabel *label = [MFLabel label]; [label styleFeedMessage:scale]; @@ -264,6 +263,11 @@ [self setScale:scale]; } +- (void)styleH32:(BOOL)scale { + [MFStyler styleLabelH32:self genericScaling:NO]; + [self setScale:scale]; +} + - (void)styleB1:(BOOL)scale { [MFStyler styleLabelB1:self genericScaling:NO]; [self setScale:scale]; @@ -279,11 +283,6 @@ [self setScale:scale]; } -- (void)styleFeedHeadline:(BOOL)scale { - [MFStyler styleLabelHeadlineFeed:self genericScaling:NO]; - [self setScale:scale]; -} - - (void)styleFeedMessage:(BOOL)scale { [MFStyler styleLabelFeedMessage:self genericScaling:NO]; [self setScale:scale]; diff --git a/MVMCoreUI/Styles/MFStyler.h b/MVMCoreUI/Styles/MFStyler.h index 41177f14..3ef51144 100644 --- a/MVMCoreUI/Styles/MFStyler.h +++ b/MVMCoreUI/Styles/MFStyler.h @@ -104,6 +104,9 @@ B3 -> Legal //75Bd 18pt + (nullable UIFont *)fontH3:(BOOL)genericScaling; + (nullable UIFont *)fontH3; +//75Bd 32pt ++ (nullable UIFont *)fontH32:(BOOL)genericScaling; ++ (nullable UIFont *)fontH32; //75Bd 13pt + (nullable UIFont *)fontB1:(BOOL)genericScaling; @@ -167,8 +170,8 @@ B3 -> Legal // Returns the fonts for these styles allowing to apply a generic scale by device or not. + (nullable UIFont *)fontForBiggerHeadLine:(BOOL)genericScaling; + (nullable UIFont *)fontForPlan:(BOOL)genericScaling; -+ (nullable UIFont *)fontForFeedHeadline:(BOOL)genericScaling; + (nullable UIFont *)fontForHeadlineSmall:(BOOL)genericScaling; ++ (nullable UIFont *)fontForHeadlineSmall2; + (nullable UIFont *)fontForHeadlineSmall2:(BOOL)genericScaling; + (nullable UIFont *)fontForHeadlineSmall2ForWidth:(CGFloat)size; + (nullable UIFont *)fontB1ForWidth:(CGFloat)size; @@ -216,6 +219,9 @@ B3 -> Legal + (void)styleLabelH3:(nonnull UILabel *)label; + (void)styleLabelH3:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; ++ (void)styleLabelH32:(nonnull UILabel *)label; ++ (void)styleLabelH32:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; + + (void)styleLabelB1:(nonnull UILabel *)label; + (void)styleLabelB1:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; @@ -231,7 +237,6 @@ B3 -> Legal #pragma mark - 1.0 styles -+ (void)styleLabelHeadlineFeed:(nonnull UILabel *)label; + (void)styleLabelFeedMessage:(nonnull UILabel *)label; + (void)styleFeedCardTitleLabel:(nonnull UILabel *)label; @@ -240,7 +245,6 @@ B3 -> Legal + (void)styleStandardSeparatorView:(nonnull UIView *)view; + (void)styleLabelHeadlineSmall:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; -+ (void)styleLabelHeadlineFeed:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling; + (void)styleLabelFeedMessage:(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 00e8c55c..edeeb625 100644 --- a/MVMCoreUI/Styles/MFStyler.m +++ b/MVMCoreUI/Styles/MFStyler.m @@ -126,6 +126,18 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; return [self fontH3:YES]; } ++ (nullable UIFont *)fontH32:(BOOL)genericScaling { + CGFloat size = 32; + if (genericScaling) { + size = [self sizeFontGenericForCurrentDevice:size]; + } + return [MFFonts mfFont75Bd:size]; +} + ++ (nullable UIFont *)fontH32 { + return [self fontH32:YES]; +} + + (nullable UIFont *)fontB1:(BOOL)genericScaling { CGFloat size = 13; if (genericScaling) { @@ -200,18 +212,6 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; return [self fontForBiggerHeadLine:YES]; } -+ (nullable UIFont *)fontForFeedHeadline:(BOOL)genericScaling { - CGFloat size = 32; - if (genericScaling) { - size = [self sizeFontGenericForCurrentDevice:size]; - } - return [MFFonts mfFont75Bd:size]; -} - -+ (nullable UIFont *)fontForFeedHeadline { - return [self fontForFeedHeadline:YES]; -} - + (nullable UIFont *)fontForHeadlineSmall:(BOOL)genericScaling { CGFloat size = 15; if (genericScaling) { @@ -548,11 +548,31 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; label.textColor = [UIColor blackColor]; } ++ (void)styleLabelH32:(nonnull UILabel *)label { + label.font = [MFStyler fontH32]; + label.textColor = [UIColor blackColor]; +} + ++ (void)styleLabelH32:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { + label.font = [MFStyler fontH32:genericScaling]; + label.textColor = [UIColor blackColor]; +} + ++ (void)styleLabelB1:(nonnull UILabel *)label { + label.font = [MFStyler fontB1]; + label.textColor = [UIColor blackColor]; +} + + (void)styleLabelB1:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { label.font = [MFStyler fontB1:genericScaling]; label.textColor = [UIColor blackColor]; } ++ (void)styleLabelB2:(nonnull UILabel *)label { + label.font = [MFStyler fontB2]; + label.textColor = [UIColor blackColor]; +} + + (void)styleLabelB2:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { label.font = [MFStyler fontB2:genericScaling]; label.textColor = [UIColor blackColor]; @@ -590,21 +610,6 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; #pragma mark - 1.0 Styles -+ (void)styleLabelHeadlineFeed:(nonnull UILabel *)label { - label.font = [MFStyler fontForFeedHeadline]; - label.textColor = [UIColor mfRedColor]; -} - -+ (void)styleLabelB2:(nonnull UILabel *)label { - label.font = [MFStyler fontB2]; - label.textColor = [UIColor blackColor]; -} - -+ (void)styleLabelB1:(nonnull UILabel *)label { - label.font = [MFStyler fontB1]; - label.textColor = [UIColor blackColor]; -} - + (void)styleFeedCardTitleLabel:(nonnull UILabel *)label { label.font = [MFStyler fontForFeedCardTitle]; label.textColor = [UIColor blackColor]; @@ -624,11 +629,6 @@ CGFloat const LabelWithInternalButtonLineSpace = 2; label.textColor = [UIColor blackColor]; } -+ (void)styleLabelHeadlineFeed:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { - label.font = [MFStyler fontForFeedHeadline:genericScaling]; - label.textColor = [UIColor blackColor]; -} - + (void)styleLabelFeedMessage:(nonnull UILabel *)label genericScaling:(BOOL)genericScaling { label.font = [MFStyler fontForFeedMessage:genericScaling]; label.textColor = [UIColor blackColor]; diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h index d8d5c27d..cc1df5e6 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h @@ -23,6 +23,7 @@ + (nonnull UILabel *)commonLabelH1; + (nonnull UILabel *)commonLabelH2; + (nonnull UILabel *)commonLabelH3; ++ (nonnull UILabel *)commonLabelH32; + (nonnull UILabel *)commonLabelB1; + (nonnull UILabel *)commonLabelB2; + (nonnull UILabel *)commonLabelB3; @@ -31,7 +32,6 @@ // Creates and returns common labels + (nonnull UILabel *)label; -+ (nonnull UILabel *)commonLabelFeedHeadline; #pragma mark - Text Field diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m index dfae6b26..affbc470 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m @@ -71,6 +71,12 @@ static const CGFloat VertialShadowOffset = 6; return label; } ++ (nonnull UILabel *)commonLabelH32 { + UILabel *label = [MVMCoreUICommonViewsUtility label]; + [MFStyler styleLabelH32:label]; + return label; +} + + (nonnull UILabel *)commonLabelB1 { UILabel *label = [MVMCoreUICommonViewsUtility label]; [MFStyler styleLabelB1:label]; @@ -89,12 +95,6 @@ static const CGFloat VertialShadowOffset = 6; return label; } -+ (nonnull UILabel *)commonLabelFeedHeadline { - UILabel *label = [MVMCoreUICommonViewsUtility label]; - [MFStyler styleLabelHeadlineFeed:label]; - return label; -} - #pragma mark - Text Field + (nonnull UIPickerView *)addPickerToTextField:(nonnull UITextField *)textField delegate:(nullable id )delegate {