react-native-navigation的迁移库

RNNModalManager.h 1.2KB

123456789101112131415161718192021222324252627
  1. #import <Foundation/Foundation.h>
  2. #import <UIKit/UIKit.h>
  3. typedef void (^RNNTransitionCompletionBlock)(void);
  4. typedef void (^RNNTransitionWithComponentIdCompletionBlock)(NSString *componentId);
  5. typedef void (^RNNTransitionRejectionBlock)(NSString *code, NSString *message, NSError *error);
  6. @protocol RNNModalManagerDelegate <NSObject>
  7. - (void)dismissedModal:(UIViewController *)viewController;
  8. - (void)attemptedToDismissModal:(UIViewController *)viewController;
  9. - (void)dismissedMultipleModals:(NSArray *)viewControllers;
  10. @end
  11. @interface RNNModalManager : NSObject <UIAdaptivePresentationControllerDelegate>
  12. @property (nonatomic, weak) id<RNNModalManagerDelegate> delegate;
  13. - (void)showModal:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNTransitionWithComponentIdCompletionBlock)completion;
  14. - (void)showModal:(UIViewController *)viewController animated:(BOOL)animated hasCustomAnimation:(BOOL)hasCustomAnimation completion:(RNNTransitionWithComponentIdCompletionBlock)completion;
  15. - (void)dismissModal:(UIViewController *)viewController completion:(RNNTransitionCompletionBlock)completion;
  16. - (void)dismissAllModalsAnimated:(BOOL)animated completion:(void (^ __nullable)(void))completion;
  17. - (void)dismissAllModalsSynchronosly;
  18. @end