forked from wix/react-native-navigation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRNNReactView.h
51 lines (36 loc) · 1.37 KB
/
RNNReactView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifdef RN_FABRIC_ENABLED
#import <React/RCTFabricSurfaceHostingProxyRootView.h>
#else
#import <React/RCTRootView.h>
#endif
#import "RNNEventEmitter.h"
#import "UIView+Utils.h"
#import <React/RCTRootViewDelegate.h>
#import <React/RCTUIManager.h>
#define ComponentTypeScreen @"Component"
#define ComponentTypeTitle @"TopBarTitle"
#define ComponentTypeButton @"TopBarButton"
#define ComponentTypeBackground @"TopBarBackground"
typedef void (^RNNReactViewReadyCompletionBlock)(void);
@protocol RNNComponentProtocol <NSObject>
- (NSString *)componentId;
- (NSString *)componentType;
- (void)componentWillAppear;
- (void)componentDidAppear;
- (void)componentDidDisappear;
@end
#ifdef RN_FABRIC_ENABLED
@interface RNNReactView
: RCTFabricSurfaceHostingProxyRootView <RCTRootViewDelegate, RNNComponentProtocol>
#else
@interface RNNReactView : RCTRootView <RCTRootViewDelegate, RNNComponentProtocol>
#endif
- (instancetype)initWithBridge:(RCTBridge *)bridge
moduleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
eventEmitter:(RNNEventEmitter *)eventEmitter
reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock;
@property(nonatomic, copy) RNNReactViewReadyCompletionBlock reactViewReadyBlock;
@property(nonatomic, strong) RNNEventEmitter *eventEmitter;
- (void)invalidate;
@end