-
-
Notifications
You must be signed in to change notification settings - Fork 644
Expand file tree
/
Copy pathRNSTabsHostComponentView.h
More file actions
102 lines (70 loc) · 2.74 KB
/
RNSTabsHostComponentView.h
File metadata and controls
102 lines (70 loc) · 2.74 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#pragma once
#import "RNSDefines.h"
#import "RNSEnums.h"
#import "RNSReactBaseView.h"
#import "RNSScreenContainer.h"
#import "RNSTabsHostComponentViewManager.h"
#import "RNSTabsHostEventEmitter.h"
#import "RNSTabsNavigationState.h"
#if !RCT_NEW_ARCH_ENABLED
#import <React/RCTInvalidating.h>
#endif
#import "RNSTabBarController.h"
NS_ASSUME_NONNULL_BEGIN
@class RCTImageLoader;
/**
* Component view. Lifecycle is managed by React Native.
*
* This component serves as:
* 1. host for UITabBarController
* 2. provider of React state & props for the tab bar controller
* 3. two way communication channel with React (commands & events)
*/
@interface RNSTabsHostComponentView : RNSReactBaseView <
RNSScreenContainerDelegate,
RNSTabBarControllerDelegate
#if !RCT_NEW_ARCH_ENABLED
,
RCTInvalidating
#endif
>
#if !RCT_NEW_ARCH_ENABLED
- (instancetype)initWithFrame:(CGRect)frame reactImageLoader:(RCTImageLoader *)imageLoader;
#endif // !RCT_NEW_ARCH_ENABLED
@property (nonatomic, nonnull, strong, readonly) RNSTabBarController *controller;
@end
#pragma mark - Props
@interface RNSTabsHostComponentView ()
/**
* Last navigation state requested by JS. Will be nonnull after first prop update.
*/
@property (nonatomic, strong, readonly, nullable) RNSTabsNavigationState *navStateRequest;
@property (nonatomic, readonly) BOOL rejectStaleNavStateUpdates;
@property (nonatomic, strong, readonly, nullable) UIColor *tabBarTintColor;
@property (nonatomic, readonly) BOOL tabBarHidden;
@property (nonatomic, strong, readonly, nullable) UIColor *nativeContainerBackgroundColor;
@property (nonatomic, readonly) UIUserInterfaceStyle colorScheme;
@property (nonatomic, readonly) UITraitEnvironmentLayoutDirection layoutDirection;
#if RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
@property (nonatomic, readonly) UITabBarMinimizeBehavior tabBarMinimizeBehavior API_AVAILABLE(ios(26.0));
#endif // Check for iOS >= 26
#if RNS_IPHONE_OS_VERSION_AVAILABLE(18_0)
@property (nonatomic, readonly) UITabBarControllerMode tabBarControllerMode API_AVAILABLE(ios(18.0));
#endif // Check for iOS >= 18
@end
#pragma mark - React Events
@interface RNSTabsHostComponentView ()
/**
* Use returned object to emit appropriate React Events to Element Tree.
*/
- (nonnull RNSTabsHostEventEmitter *)reactEventEmitter;
#if !RCT_NEW_ARCH_ENABLED
#pragma mark - LEGACY Event blocks
@property (nonatomic, copy) RCTDirectEventBlock onNativeFocusChange;
#endif
@end
#pragma mark - React Image Loader
@interface RNSTabsHostComponentView ()
- (nullable RCTImageLoader *)reactImageLoader;
@end
NS_ASSUME_NONNULL_END