diff --git a/docs/next/native-modules-ios.html b/docs/next/native-modules-ios.html index 257a6cdd382..fc367701a07 100644 --- a/docs/next/native-modules-ios.html +++ b/docs/next/native-modules-ios.html @@ -254,6 +254,14 @@ RCTRootView *rootView = [[RCTRootView alloc]
console.log(CalendarManager.firstDayOfTheWeek);
Note that the constants are exported only at initialization time, so if you change constantsToExport values at runtime it won't affect the JavaScript environment.
+ requiresMainQueueSetupIf you override - constantsToExport then you should also implement + requiresMainQueueSetup to let React Native know if your module needs to be initialized on the main thread. Otherwise you will see a warning that in the future your module may be initialized on a background thread unless you explicitly opt out with + requiresMainQueueSetup:
+ (BOOL)requiresMainQueueSetup
+{
+ return YES; // only do this if your module initialization relies on calling UIKit!
+}
+
+If your module does not require access to UIKit, then you should respond to + requiresMainQueueSetup with NO.
Enums that are defined via NS_ENUM cannot be used as method arguments without first extending RCTConvert.
In order to export the following NS_ENUM definition:
console.log(CalendarManager.firstDayOfTheWeek);
Note that the constants are exported only at initialization time, so if you change constantsToExport values at runtime it won't affect the JavaScript environment.
+ requiresMainQueueSetupIf you override - constantsToExport then you should also implement + requiresMainQueueSetup to let React Native know if your module needs to be initialized on the main thread. Otherwise you will see a warning that in the future your module may be initialized on a background thread unless you explicitly opt out with + requiresMainQueueSetup:
+ (BOOL)requiresMainQueueSetup
+{
+ return YES; // only do this if your module initialization relies on calling UIKit!
+}
+
+If your module does not require access to UIKit, then you should respond to + requiresMainQueueSetup with NO.
Enums that are defined via NS_ENUM cannot be used as method arguments without first extending RCTConvert.
In order to export the following NS_ENUM definition:
Specifies font weight. The values 'normal' and 'bold' are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen.
lineHeight: number
textAlign: enum('auto', 'left', 'right', 'center', 'justify')
Specifies text alignment. The value 'justify' is only supported on iOS and fallbacks to left on Android.
Specifies text alignment. The value 'justify' is only supported on iOS and Android Oreo (8.0) or above (API level >= 26). For lower android version it will fallback to left.
textDecorationLine: enum('none', 'underline', 'line-through', 'underline line-through')
textShadowColor: color
fontFamily: string
Specifies font weight. The values 'normal' and 'bold' are supported for most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen.
lineHeight: number
textAlign: enum('auto', 'left', 'right', 'center', 'justify')
Specifies text alignment. The value 'justify' is only supported on iOS and fallbacks to left on Android.
Specifies text alignment. The value 'justify' is only supported on iOS and Android Oreo (8.0) or above (API level >= 26). For lower android version it will fallback to left.
textDecorationLine: enum('none', 'underline', 'line-through', 'underline line-through')
textShadowColor: color
fontFamily: string