File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838namespace react = facebook::react;
3939#endif // RCT_NEW_ARCH_ENABLED
4040
41- static NSNumber *const DEFAULT_TITLE_FONT_SIZE = @17 ;
42- static NSNumber *const DEFAULT_TITLE_LARGE_FONT_SIZE = @34 ;
41+ static const NSNumber *const DEFAULT_TITLE_FONT_SIZE = @17 ;
42+ static const NSNumber *const DEFAULT_TITLE_LARGE_FONT_SIZE = @34 ;
4343
4444#if !defined(RCT_NEW_ARCH_ENABLED)
4545// Some RN private method hacking below. Couldn't figure out better way to access image data
@@ -488,7 +488,7 @@ + (UINavigationBarAppearance *)buildAppearance:(UIViewController *)vc withConfig
488488#endif
489489
490490 NSString *family = config.titleFontFamily ?: nil ;
491- NSNumber *size = config.titleFontSize ?: DEFAULT_TITLE_FONT_SIZE;
491+ NSNumber *size = config.titleFontSize ?: [ DEFAULT_TITLE_FONT_SIZE copy ] ;
492492 NSString *weight = config.titleFontWeight ?: nil ;
493493 if (family || weight) {
494494 attrs[NSFontAttributeName ] = [RCTFont updateFont: nil
@@ -516,7 +516,7 @@ + (UINavigationBarAppearance *)buildAppearance:(UIViewController *)vc withConfig
516516#endif
517517
518518 NSString *largeFamily = config.largeTitleFontFamily ?: nil ;
519- NSNumber *largeSize = config.largeTitleFontSize ?: DEFAULT_TITLE_LARGE_FONT_SIZE;
519+ NSNumber *largeSize = config.largeTitleFontSize ?: [ DEFAULT_TITLE_LARGE_FONT_SIZE copy ] ;
520520 NSString *largeWeight = config.largeTitleFontWeight ?: nil ;
521521 if (largeFamily || largeWeight) {
522522 largeAttrs[NSFontAttributeName ] = [RCTFont updateFont: nil
You can’t perform that action at this time.
0 commit comments