Bläddra i källkod

Fix issue with previous iOS version (#6029)

Check if prefersLargeTitles is supported to avoid a crash on iOS < 11.0
Romuald Percereau 4 år sedan
förälder
incheckning
e923b8c022
No account linked to committer's email address
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3
    1
      lib/ios/RNNStackController.m

+ 3
- 1
lib/ios/RNNStackController.m Visa fil

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