Browse Source

Support iOS 11 prefersLargeTitles #1643 (#2090)

* Support iOS 11 prefersLargeTitles #1643

* better and more simple version checking and setting
Jong Eun Lee 7 years ago
parent
commit
9f2f15bc4f
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      ios/RCCViewController.m

+ 6
- 0
ios/RCCViewController.m View File

644
       self.navigationItem.titleView.clipsToBounds = YES;
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