Sfoglia il codice sorgente

Support iOS 11 prefersLargeTitles #1643 (#2090)

* Support iOS 11 prefersLargeTitles #1643

* better and more simple version checking and setting
Jong Eun Lee 7 anni fa
parent
commit
9f2f15bc4f
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6
    0
      ios/RCCViewController.m

+ 6
- 0
ios/RCCViewController.m Vedi File

@@ -644,6 +644,12 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
644 644
       self.navigationItem.titleView.clipsToBounds = YES;
645 645
     }
646 646
   }
647
+  
648
+  if ([self.navigationController.navigationBar respondsToSelector:@selector(setPrefersLargeTitles:)]) {
649
+    NSNumber *prefersLargeTitles = self.navigatorStyle[@"prefersLargeTitles"];
650
+    BOOL prefersLargeTitlesBool = prefersLargeTitles ? [prefersLargeTitles boolValue] : NO;
651
+    self.navigationController.navigationBar.prefersLargeTitles = prefersLargeTitlesBool;
652
+  }
647 653
 }
648 654
 
649 655