Skip to content

Commit

Permalink
Update default value for fontsize in navigation title and subtitle (#…
Browse files Browse the repository at this point in the history
…5868)

Co-authored-by: Yogev Ben David <[email protected]>
  • Loading branch information
maryjenel and yogevbd authored Jan 29, 2020
1 parent d9bd03f commit 0741799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ios/RNNTitleViewHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ -(UILabel*)setupSubtitle {
subtitleLabel.backgroundColor = [UIColor clearColor];
subtitleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;

NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_subtitleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_subtitleOptions.fontSize getWithDefaultValue:nil] fontWeight:[_subtitleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_subtitleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_subtitleOptions.fontSize getWithDefaultValue:@(12)] fontWeight:[_subtitleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
[subtitleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.subtitle attributes:fontAttributes]];


Expand Down Expand Up @@ -136,7 +136,7 @@ -(UILabel*)setupTitle {

titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;

NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_titleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_titleOptions.fontSize getWithDefaultValue:nil] fontWeight:[_titleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_titleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_titleOptions.fontSize getWithDefaultValue:@(16)] fontWeight:[_titleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
[titleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.title attributes:fontAttributes]];

CGSize labelSize = [titleLabel.text sizeWithAttributes:fontAttributes];
Expand Down

0 comments on commit 0741799

Please sign in to comment.