UNPKG

1.39 kBtext/x-cView Raw
1#import <UIKit/UIKit.h>
2
3#ifdef RCT_NEW_ARCH_ENABLED
4#import <React/RCTViewComponentView.h>
5#import <react/renderer/components/rnscreens/RCTComponentViewHelpers.h>
6#endif
7
8#import <React/RCTBridge.h>
9#import <React/RCTComponent.h>
10#import <React/RCTViewManager.h>
11#import "RNSEnums.h"
12
13@interface RNSSearchBar :
14#ifdef RCT_NEW_ARCH_ENABLED
15 RCTViewComponentView <UISearchBarDelegate, RCTRNSSearchBarViewProtocol>
16#else
17 UIView <UISearchBarDelegate>
18#endif
19
20@property (nonatomic) BOOL hideWhenScrolling;
21@property (nonatomic) RNSSearchBarPlacement placement;
22@property (nonatomic, retain) UISearchController *controller;
23
24#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_16_0) && \
25 __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_0 && !TARGET_OS_TV
26- (UINavigationItemSearchBarPlacement)placementAsUINavigationItemSearchBarPlacement API_AVAILABLE(ios(16.0))
27 API_UNAVAILABLE(tvos, watchos);
28#endif // Check for iOS >= 16 && !TARGET_OS_TV
29
30#ifdef RCT_NEW_ARCH_ENABLED
31#else
32@property (nonatomic, copy) RCTDirectEventBlock onChangeText;
33@property (nonatomic, copy) RCTDirectEventBlock onCancelButtonPress;
34@property (nonatomic, copy) RCTDirectEventBlock onSearchButtonPress;
35@property (nonatomic, copy) RCTDirectEventBlock onSearchFocus;
36@property (nonatomic, copy) RCTDirectEventBlock onSearchBlur;
37#endif
38
39@end
40
41@interface RNSSearchBarManager : RCTViewManager
42
43@end