瀏覽代碼

Fix issue with previous iOS version (#6029)

Check if prefersLargeTitles is supported to avoid a crash on iOS < 11.0
Romuald Percereau 4 年之前
父節點
當前提交
e923b8c022
No account linked to committer's email address
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      lib/ios/RNNStackController.m

+ 3
- 1
lib/ios/RNNStackController.m 查看文件

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