react-native-navigation的迁移库

RNNModalManager.h 1.1KB

12345678910111213141516171819202122232425
  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;
  16. @end