react-native-navigation的迁移库

RNNSideMenuChildVC.m 996B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // RNNSideMenuChildVC.m
  3. // ReactNativeNavigation
  4. //
  5. // Created by Ran Greenberg on 09/02/2017.
  6. // Copyright © 2017 Wix. All rights reserved.
  7. //
  8. #import "RNNSideMenuChildVC.h"
  9. @interface RNNSideMenuChildVC ()
  10. @property (readwrite) RNNSideMenuChildType type;
  11. @property (readwrite) UIViewController<RNNRootViewProtocol> *child;
  12. @end
  13. @implementation RNNSideMenuChildVC
  14. -(instancetype) initWithChild:(UIViewController<RNNRootViewProtocol>*)child type:(RNNSideMenuChildType)type {
  15. self = [super init];
  16. self.child = child;
  17. [self addChildViewController:self.child];
  18. [self.child.view setFrame:self.view.bounds];
  19. [self.view addSubview:self.child.view];
  20. [self.view bringSubviewToFront:self.child.view];
  21. self.type = type;
  22. return self;
  23. }
  24. - (void)mergeOptions:(RNNOptions *)options {
  25. [self.child mergeOptions:options];
  26. }
  27. - (UIStatusBarStyle)preferredStatusBarStyle {
  28. return self.child.preferredStatusBarStyle;
  29. }
  30. - (NSString *)componentId {
  31. return _child.componentId;
  32. }
  33. @end