Explorar el Código

Fix issue with previous iOS version (#6029)

Check if prefersLargeTitles is supported to avoid a crash on iOS < 11.0
Romuald Percereau hace 4 años
padre
commit
e923b8c022
No account linked to committer's email address
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3
    1
      lib/ios/RNNStackController.m

+ 3
- 1
lib/ios/RNNStackController.m Ver fichero

@@ -12,7 +12,9 @@
12 12
     self = [super initWithLayoutInfo:layoutInfo creator:creator options:options defaultOptions:defaultOptions presenter:presenter eventEmitter:eventEmitter childViewControllers:childViewControllers];
13 13
     _stackDelegate = [[StackControllerDelegate alloc] initWithEventEmitter:self.eventEmitter];
14 14
     self.delegate = _stackDelegate;
15
-    self.navigationBar.prefersLargeTitles = YES;
15
+    if (@available(iOS 11.0, *)) {
16
+        self.navigationBar.prefersLargeTitles = YES;
17
+    }
16 18
     return self;
17 19
 }
18 20