Skip to content

Commit 1ee3ca4

Browse files
committed
Fix date picker in XCFramework
1 parent 1dcf1c1 commit 1ee3ca4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/RNDatePickerManager.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import <React/RCTLog.h>
22
#import <React/RCTUIManager.h>
33
#import <React/RCTViewManager.h>
4-
4+
#import <React/RCTUtils.h>
55
#import "RNDatePickerManager.h"
66
#import "RCTConvert.h"
77
#import "DatePicker.h"
@@ -94,7 +94,7 @@ - (UIView *)view
9494
dispatch_async(dispatch_get_main_queue(), ^{
9595

9696
bool iPad = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad;
97-
UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
97+
UIViewController *rootViewController = RCTKeyWindow().rootViewController;
9898
CGRect rootBounds = rootViewController.view.bounds;
9999
NSString * title = [RCTConvert NSString:[props objectForKey:@"title"]];
100100
title = [title isEqualToString:@""] ? nil : title;

0 commit comments

Comments
 (0)