Browse Source

Fix issue with previous iOS version (#6029)

Check if prefersLargeTitles is supported to avoid a crash on iOS < 11.0
Romuald Percereau 4 years ago
parent
commit
e923b8c022
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      lib/ios/RNNStackController.m

+ 3
- 1
lib/ios/RNNStackController.m View File

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