react-native-navigation的迁移库

UIViewController+SideMenuController.m 359B

1234567891011121314151617181920
  1. #import "UIViewController+SideMenuController.h"
  2. @implementation UIViewController (SideMenuController)
  3. - (RNNSideMenuController *)sideMenuController {
  4. UIViewController* vc = self;
  5. while (vc) {
  6. if ([vc isKindOfClass:[RNNSideMenuController class]]) {
  7. return (RNNSideMenuController *)vc;
  8. }
  9. vc = vc.parentViewController;
  10. }
  11. return nil;
  12. }
  13. @end