ソースを参照

Revert "[iOS] Large title text attributes (#2112)" (#2603)

This reverts commit f7ec9ee840.
Ran Greenberg 6 年 前
コミット
b2454ebc5a
No account linked to committer's email address
共有2 個のファイルを変更した1 個の追加16 個の削除を含む
  1. 0
    4
      docs/styling-the-navigator.md
  2. 1
    12
      ios/RCCViewController.m

+ 0
- 4
docs/styling-the-navigator.md ファイルの表示

@@ -95,10 +95,6 @@ this.props.navigator.setStyle({
95 95
   navBarRightButtonColor: 'blue', // Change color of right nav bar button
96 96
   navBarRightButtonFontWeight: '600', // Change font weight of right nav bar button
97 97
 
98
-  navBarLargeTextColor: '#000000', // change the text color of large titles
99
-  navBarLargeTextFontSize: 34, // change the font size of large titles
100
-  navBarLargeTextFontFamily: 'font-name', // Changes the large title font
101
-
102 98
   topBarShadowColor: 'blue' // Sets shadow of the navbar, Works only when topBarElevationShadowEnabled: true
103 99
   topBarShadowOpacity: 0.5, // Sets shadow opacity on the navbar, Works only when topBarElevationShadowEnabled: true
104 100
   topBarShadowOffset: 12, // Sets shadow offset on the navbar, Works only when topBarElevationShadowEnabled: true

+ 1
- 12
ios/RCCViewController.m ファイルの表示

@@ -362,19 +362,8 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
362 362
     viewController.navigationController.navigationBar.barTintColor = nil;
363 363
   }
364 364
   
365
-  NSMutableDictionary *titleTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle
366
-                                                                           withPrefix:@"navBarText"
367
-                                                                             baseFont:[UIFont boldSystemFontOfSize:17]];
365
+  NSMutableDictionary *titleTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle withPrefix:@"navBarText" baseFont:[UIFont boldSystemFontOfSize:17]];
368 366
   [self.navigationController.navigationBar setTitleTextAttributes:titleTextAttributes];
369
-
370
-  if ([self.navigationController.navigationBar respondsToSelector:@selector(setLargeTitleTextAttributes:)]) {
371
-    // As defined in Apple's UI Design Resources: https://developer.apple.com/design/resources/
372
-    UIFont *largeBaseFont = [UIFont boldSystemFontOfSize:34];
373
-    NSMutableDictionary *largeTitleTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle
374
-                                                                                  withPrefix:@"navBarLargeText"
375
-                                                                                    baseFont:largeBaseFont];
376
-    [self.navigationController.navigationBar setLargeTitleTextAttributes:largeTitleTextAttributes];
377
-  }
378 367
   
379 368
   NSMutableDictionary *navButtonTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle withPrefix:@"navBarButton"];
380 369
   NSMutableDictionary *leftNavButtonTextAttributes = [RCTHelpers textAttributesFromDictionary:self.navigatorStyle withPrefix:@"navBarLeftButton"];