billysk
billysk

Reputation: 137

Property 'overrideUserInterfaceStyle' not found on object of type 'DatePicker *'

I am using react native 0.61.4 and library react-native-date-picker 2.7.3 . I am trying to build the project through xcode and I keep getting this error: Property 'overrideUserInterfaceStyle' not found on object of type 'DatePicker *' in DatePicker.m in three functions. One of these is this one:

- (instancetype)initWithFrame:(CGRect)frame
{
    if ((self = [super initWithFrame:frame])) {
        [self addTarget:self action:@selector(didChange)
       forControlEvents:UIControlEventValueChanged];
        if(@available(iOS 13, *)) {
            self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
        }
    }
    return self;
}

Is this a bug of react-native-date-picker?

Upvotes: 1

Views: 1464

Answers (1)

Henning Hall
Henning Hall

Reputation: 1457

To be able to fully support iOS 13 I had to drop support for Xcode 10 (which I suppose you are using) in version 2.7.3 of the library.

You could either downgrade to version 2.7.2 or upgrade to Xcode 11 which I recommend you to do. Xcode 11 is also required to support iOS 13 features like dark mode or "Sign in with Apple".

I have updated the docs with this info. Sorry for the inconvenience!

Upvotes: 2

Related Questions