mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 09:21:09 +08:00
Adds support for stack navigation primitives (UINavigationViewController and Android fragment container with back button support)
46 lines
1.2 KiB
Objective-C
46 lines
1.2 KiB
Objective-C
#import <React/RCTViewManager.h>
|
|
#import <React/RCTView.h>
|
|
#import <React/RCTComponent.h>
|
|
#import "RNSScreenContainer.h"
|
|
|
|
@class RNSScreenContainerView;
|
|
|
|
typedef NS_ENUM(NSInteger, RNSScreenStackPresentation) {
|
|
RNSScreenStackPresentationPush,
|
|
RNSScreenStackPresentationModal,
|
|
RNSScreenStackPresentationTransparentModal,
|
|
};
|
|
|
|
typedef NS_ENUM(NSInteger, RNSScreenStackAnimation) {
|
|
RNSScreenStackAnimationDefault,
|
|
RNSScreenStackAnimationNone,
|
|
RNSScreenStackAnimationFade,
|
|
};
|
|
|
|
@interface RCTConvert (RNSScreen)
|
|
|
|
+ (RNSScreenStackPresentation)RNSScreenStackPresentation:(id)json;
|
|
+ (RNSScreenStackAnimation)RNSScreenStackAnimation:(id)json;
|
|
|
|
@end
|
|
|
|
@interface RNSScreenManager : RCTViewManager
|
|
@end
|
|
|
|
@interface RNSScreenView : RCTView <RCTInvalidating>
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onDismissed;
|
|
@property (weak, nonatomic) UIView<RNSScreenContainerDelegate> *reactSuperview;
|
|
@property (nonatomic, retain) UIViewController *controller;
|
|
@property (nonatomic) BOOL active;
|
|
@property (nonatomic) RNSScreenStackAnimation stackAnimation;
|
|
@property (nonatomic) RNSScreenStackPresentation stackPresentation;
|
|
|
|
- (void)notifyFinishTransitioning;
|
|
|
|
@end
|
|
|
|
@interface UIView (RNSScreen)
|
|
- (UIViewController *)parentViewController;
|
|
@end
|