react-native-navigation的迁移库

RNNModalManager.h 1.2KB

1234567891011121314151617181920212223242526
  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)dismissedMultipleModals:(NSArray *)viewControllers;
  9. @end
  10. @interface RNNModalManager : NSObject <UIAdaptivePresentationControllerDelegate>
  11. @property (nonatomic, weak) id<RNNModalManagerDelegate> delegate;
  12. - (void)showModal:(UIViewController *)viewController animated:(BOOL)animated completion:(RNNTransitionWithComponentIdCompletionBlock)completion;
  13. - (void)showModal:(UIViewController *)viewController animated:(BOOL)animated hasCustomAnimation:(BOOL)hasCustomAnimation completion:(RNNTransitionWithComponentIdCompletionBlock)completion;
  14. - (void)dismissModal:(UIViewController *)viewController completion:(RNNTransitionCompletionBlock)completion;
  15. - (void)dismissAllModalsAnimated:(BOOL)animated completion:(void (^ __nullable)(void))completion;
  16. - (void)dismissAllModalsSynchronosly;
  17. @end