File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
#import " RCTDatePickerManager.h"
9
-
10
- #import < React/RCTUIManager.h>
11
9
#import " RCTBridge.h"
12
10
#import " RCTDatePicker.h"
13
11
#import " UIView+React.h"
@@ -44,6 +42,8 @@ @implementation RCTConvert (UIDatePicker)
44
42
45
43
@implementation RCTDatePickerManager
46
44
45
+ @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;
46
+
47
47
RCT_EXPORT_MODULE ()
48
48
49
49
- (UIView *)view
@@ -62,16 +62,15 @@ - (UIView *)view
62
62
63
63
RCT_EXPORT_METHOD(setNativeDate : (nonnull NSNumber *)viewTag toDate : (NSDate *)date)
64
64
{
65
- [self .bridge.uiManager addUIBlock: ^(RCTUIManager *uiManager, NSDictionary <NSNumber *, UIView *> *viewRegistry) {
66
- UIView *view = viewRegistry[viewTag];
67
-
65
+ [_viewRegistry_DEPRECATED addUIBlock: ^(RCTViewRegistry *viewRegistry) {
66
+ UIView *view = [viewRegistry viewForReactTag: viewTag];
68
67
if ([view isKindOfClass: [RCTDatePicker class ]]) {
69
68
[(RCTDatePicker *)view setDate: date];
70
69
} else {
71
70
// This component is used in Fabric through LegacyInteropLayer.
72
71
// `RCTDatePicker` view is subview of `RCTLegacyViewManagerInteropComponentView`.
73
72
// `viewTag` passed as parameter to this method is tag of the `RCTLegacyViewManagerInteropComponentView`.
74
- UIView *subview = [uiManager viewForReactTag: viewTag] .subviews .firstObject ;
73
+ UIView *subview = view .subviews .firstObject ;
75
74
if ([subview isKindOfClass: [RCTDatePicker class ]]) {
76
75
[(RCTDatePicker *)subview setDate: date];
77
76
} else {
You can’t perform that action at this time.
0 commit comments