diff --git a/releases/next/docs/native-modules-ios.html b/releases/next/docs/native-modules-ios.html index f3e68b7a367..57c11daf817 100644 --- a/releases/next/docs/native-modules-ios.html +++ b/releases/next/docs/native-modules-ios.html @@ -7,7 +7,14 @@ RCT_EXPORT_MODULE(); -@end

React Native will not expose any methods of CalendarManager to JavaScript unless explicitly told to. This is done using the RCT_EXPORT_METHOD() macro:

RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location) +@end

React Native will not expose any methods of CalendarManager to JavaScript unless explicitly told to. This is done using the RCT_EXPORT_METHOD() macro:

#import "CalendarManager.h" +#import "RCTLog.h" + +@implementation CalendarManager + +RCT_EXPORT_MODULE(); + +RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location) { RCTLogInfo(@"Pretending to create an event %@ at %@", name, location); }

Now, from your JavaScript file you can call the method like this:

import { NativeModules } from 'react-native'; diff --git a/releases/next/docs/statusbar.html b/releases/next/docs/statusbar.html index 775d7436102..f93dc2941c8 100644 --- a/releases/next/docs/statusbar.html +++ b/releases/next/docs/statusbar.html @@ -21,9 +21,9 @@ set by the static API will get overriden by the one set by the component in the next render.

Props #

animated bool #

If the transition between status bar property changes should be animated. Supported for backgroundColor, barStyle and hidden.

hidden bool #

If the status bar is hidden.

androidbackgroundColor color #

The background color of the status bar.

androidtranslucent bool #

If the status bar is translucent. When translucent is set to true, the app will draw under the status bar. -This is useful when using a semi transparent status bar color.

iosbarStyle enum('default', 'light-content') #

Sets the color of the status bar text.

iosnetworkActivityIndicatorVisible bool #

If the network activity indicator should be visible.

iosshowHideTransition enum('fade', 'slide') #

The transition effect when showing and hiding the status bar using the hidden +This is useful when using a semi transparent status bar color.

iosbarStyle enum('default', 'light-content', 'dark-content') #

Sets the color of the status bar text.

iosnetworkActivityIndicatorVisible bool #

If the network activity indicator should be visible.

iosshowHideTransition enum('fade', 'slide') #

The transition effect when showing and hiding the status bar using the hidden prop. Defaults to 'fade'.

Methods #

static setHidden(hidden, animation?) #

Show or hide the status bar

Parameters:
Name and TypeDescription
hidden

boolean

The dialog's title.

[animation]

Optional animation when - changing the status bar hidden property.

static setBarStyle(style, animated?) #

Set the status bar style

Parameters:
Name and TypeDescription
style

Status bar style to set

[animated]

boolean

Animate the style change.

static setNetworkActivityIndicatorVisible(visible) #

Control the visibility of the network activity indicator

Parameters:
Name and TypeDescription
visible

boolean

Show the indicator.

static setBackgroundColor(color, animated?) #

Set the background color for the status bar

Parameters:
Name and TypeDescription
color

string

Background color.

[animated]

boolean

Animate the style change.

static setTranslucent(translucent) #

Control the translucency of the status bar

Parameters:
Name and TypeDescription
translucent

boolean

Set as translucent.

Type Definitions #

StatusBarStyle #

Status bar style

Type:
$Enum

Constants:
ValueDescription
default

Default status bar style

light-content

Dark background style

StatusBarAnimation #

Status bar animation

Type:
$Enum

Constants:
ValueDescription
none

No animation

fade

Fade animation

slide

Slide animation

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; + changing the status bar hidden property.

static setBarStyle(style, animated?) #

Set the status bar style

Parameters:
Name and TypeDescription
style

Status bar style to set

[animated]

boolean

Animate the style change.

static setNetworkActivityIndicatorVisible(visible) #

Control the visibility of the network activity indicator

Parameters:
Name and TypeDescription
visible

boolean

Show the indicator.

static setBackgroundColor(color, animated?) #

Set the background color for the status bar

Parameters:
Name and TypeDescription
color

string

Background color.

[animated]

boolean

Animate the style change.

static setTranslucent(translucent) #

Control the translucency of the status bar

Parameters:
Name and TypeDescription
translucent

boolean

Set as translucent.

Type Definitions #

StatusBarStyle #

Status bar style

Type:
$Enum

Constants:
ValueDescription
default

Default status bar style (dark for iOS, light for Android)

light-content

Dark background, white texts and icons

dark-content

Light background, dark texts and icons

StatusBarAnimation #

Status bar animation

Type:
$Enum

Constants:
ValueDescription
none

No animation

fade

Fade animation

slide

Slide animation

You can edit the content above on GitHub and send us a pull request!

Examples #

Edit on GitHub
'use strict'; const React = require('react'); const ReactNative = require('react-native');