mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix duplicate [RCTConvert UIUserInterfaceStyle:]
Summary: After https://github.com/facebook/react-native/pull/36122 we have two of these. This change consolidates the two category methods to be part of the base RCTConvert class instead. Changelog: [iOS][Fixed] - Fix duplicate [RCTConvert UIUserInterfaceStyle:] Reviewed By: cipolleschi Differential Revision: D44050929 fbshipit-source-id: dd216545e6194446c593cd693072f3959d653d7f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
01f2936de1
commit
d8b4737ca6
@@ -71,6 +71,7 @@ typedef NSURL RCTFileURL;
|
||||
+ (UIKeyboardType)UIKeyboardType:(id)json;
|
||||
+ (UIKeyboardAppearance)UIKeyboardAppearance:(id)json;
|
||||
+ (UIReturnKeyType)UIReturnKeyType:(id)json;
|
||||
+ (UIUserInterfaceStyle)UIUserInterfaceStyle:(id)json API_AVAILABLE(ios(12));
|
||||
#if !TARGET_OS_TV
|
||||
+ (UIDataDetectorTypes)UIDataDetectorTypes:(id)json;
|
||||
#endif
|
||||
|
||||
@@ -501,6 +501,16 @@ RCT_ENUM_CONVERTER(
|
||||
UIReturnKeyDefault,
|
||||
integerValue)
|
||||
|
||||
RCT_ENUM_CONVERTER(
|
||||
UIUserInterfaceStyle,
|
||||
(@{
|
||||
@"unspecified" : @(UIUserInterfaceStyleUnspecified),
|
||||
@"light" : @(UIUserInterfaceStyleLight),
|
||||
@"dark" : @(UIUserInterfaceStyleDark),
|
||||
}),
|
||||
UIUserInterfaceStyleUnspecified,
|
||||
integerValue)
|
||||
|
||||
RCT_ENUM_CONVERTER(
|
||||
UIViewContentMode,
|
||||
(@{
|
||||
|
||||
@@ -32,20 +32,6 @@ RCT_ENUM_CONVERTER(
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTConvert (UIUserInterfaceStyle)
|
||||
|
||||
RCT_ENUM_CONVERTER(
|
||||
UIUserInterfaceStyle,
|
||||
(@{
|
||||
@"unspecified" : @(UIUserInterfaceStyleUnspecified),
|
||||
@"light" : @(UIUserInterfaceStyleLight),
|
||||
@"dark" : @(UIUserInterfaceStyleDark),
|
||||
}),
|
||||
UIUserInterfaceStyleUnspecified,
|
||||
integerValue)
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTAlertManager () <NativeAlertManagerSpec>
|
||||
|
||||
@end
|
||||
|
||||
@@ -69,20 +69,6 @@ NSString *RCTColorSchemePreference(UITraitCollection *traitCollection)
|
||||
return RCTAppearanceColorSchemeLight;
|
||||
}
|
||||
|
||||
@implementation RCTConvert (UIUserInterfaceStyle)
|
||||
|
||||
RCT_ENUM_CONVERTER(
|
||||
UIUserInterfaceStyle,
|
||||
(@{
|
||||
@"light" : @(UIUserInterfaceStyleLight),
|
||||
@"dark" : @(UIUserInterfaceStyleDark),
|
||||
@"unspecified" : @(UIUserInterfaceStyleUnspecified)
|
||||
}),
|
||||
UIUserInterfaceStyleUnspecified,
|
||||
integerValue);
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTAppearance () <NativeAppearanceSpec>
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user