react-native-navigation的迁移库

RNNModalManager.h 1.1KB

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