react-native-navigation的迁移库

RNNSplitViewController.m 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #import "RNNSplitViewController.h"
  2. #import "UIViewController+LayoutProtocol.h"
  3. @implementation RNNSplitViewController
  4. - (void)setViewControllers:(NSArray<__kindof UIViewController *> *)viewControllers {
  5. [super setViewControllers:viewControllers];
  6. UIViewController<UISplitViewControllerDelegate>* masterViewController = viewControllers[0];
  7. self.delegate = masterViewController;
  8. }
  9. - (UIViewController *)getCurrentChild {
  10. return self.viewControllers[0];
  11. }
  12. # pragma mark - UIViewController overrides
  13. - (void)willMoveToParentViewController:(UIViewController *)parent {
  14. [self.presenter willMoveToParentViewController:parent];
  15. }
  16. - (UIStatusBarStyle)preferredStatusBarStyle {
  17. return [self.presenter getStatusBarStyle];
  18. }
  19. - (BOOL)prefersStatusBarHidden {
  20. return [self.presenter getStatusBarVisibility];
  21. }
  22. - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
  23. return [self.presenter getOrientation];
  24. }
  25. - (BOOL)hidesBottomBarWhenPushed {
  26. return [self.presenter hidesBottomBarWhenPushed];
  27. }
  28. @end