浏览代码

Support iOS 11 prefersLargeTitles #1643 (#2090)

* Support iOS 11 prefersLargeTitles #1643

* better and more simple version checking and setting
Jong Eun Lee 7 年前
父节点
当前提交
9f2f15bc4f
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      ios/RCCViewController.m

+ 6
- 0
ios/RCCViewController.m 查看文件

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