react-native-navigation的迁移库

RNNSideMenuChildVC.m 951B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 addChildViewController:self.child];
  19. [self.child.view setFrame:self.view.bounds];
  20. [self.view addSubview:self.child.view];
  21. [self.view bringSubviewToFront:self.child.view];
  22. self.type = type;
  23. return self;
  24. }
  25. - (BOOL)isCustomTransitioned {
  26. return NO;
  27. }
  28. - (RNNOptions *)options {
  29. return nil;
  30. }
  31. - (NSString *)componentId {
  32. return _child.componentId;
  33. }
  34. @end