Explorar el Código

Support iOS 11 prefersLargeTitles #1643 (#2090)

* Support iOS 11 prefersLargeTitles #1643

* better and more simple version checking and setting
Jong Eun Lee hace 7 años
padre
commit
9f2f15bc4f
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6
    0
      ios/RCCViewController.m

+ 6
- 0
ios/RCCViewController.m Ver fichero

@@ -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