react-native-navigation的迁移库

UINavigationController+RNNCommands.h 1.2KB

12345678910111213141516171819202122
  1. #import <UIKit/UIKit.h>
  2. typedef void (^RNNTransitionCompletionBlock)(void);
  3. typedef void (^RNNPopCompletionBlock)(NSArray* poppedViewControllers);
  4. typedef void (^RNNTransitionRejectionBlock)(NSString *code, NSString *message, NSError *error);
  5. @interface UINavigationController (RNNCommands)
  6. - (void)push:(UIViewController *)newTop onTop:(UIViewController *)onTopViewController animated:(BOOL)animated completion:(RNNTransitionCompletionBlock)completion rejection:(RNNTransitionRejectionBlock)rejection;
  7. - (void)pop:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNTransitionCompletionBlock)completion rejection:(RNNTransitionRejectionBlock)rejection;
  8. - (void)popTo:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNPopCompletionBlock)completion rejection:(RNNTransitionRejectionBlock)rejection;
  9. - (void)popToRoot:(UIViewController*)viewController animated:(BOOL)animated completion:(RNNPopCompletionBlock)completion rejection:(RNNTransitionRejectionBlock)rejection;
  10. - (void)setStackChildren:(NSArray<UIViewController *> *)children fromViewController:(UIViewController *)fromViewController animated:(BOOL)animated completion:(RNNTransitionCompletionBlock)completion rejection:(RNNTransitionRejectionBlock)rejection;
  11. @end