Browse Source

Update default value for fontsize in navigation title and subtitle (#5868)

Co-authored-by: Yogev Ben David <yogevbd@wix.com>
Mary Jenel 4 years ago
parent
commit
0741799281
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      lib/ios/RNNTitleViewHelper.m

+ 2
- 2
lib/ios/RNNTitleViewHelper.m View File

@@ -104,7 +104,7 @@
104 104
 	subtitleLabel.backgroundColor = [UIColor clearColor];
105 105
 	subtitleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
106 106
 	
107
-	NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_subtitleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_subtitleOptions.fontSize getWithDefaultValue:nil] fontWeight:[_subtitleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
107
+	NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_subtitleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_subtitleOptions.fontSize getWithDefaultValue:@(12)] fontWeight:[_subtitleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
108 108
 	[subtitleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.subtitle attributes:fontAttributes]];
109 109
 	
110 110
 	
@@ -136,7 +136,7 @@
136 136
 	
137 137
 	titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
138 138
 	
139
-	NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_titleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_titleOptions.fontSize getWithDefaultValue:nil] fontWeight:[_titleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
139
+	NSDictionary* fontAttributes = [RNNFontAttributesCreator createWithFontFamily:[_titleOptions.fontFamily getWithDefaultValue:nil] fontSize:[_titleOptions.fontSize getWithDefaultValue:@(16)] fontWeight:[_titleOptions.fontWeight getWithDefaultValue:nil] color:[_subtitleOptions.color getWithDefaultValue:nil]];
140 140
 	[titleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.title attributes:fontAttributes]];
141 141
 	
142 142
 	CGSize labelSize = [titleLabel.text sizeWithAttributes:fontAttributes];