diff --git a/releases/next/docs/native-modules-ios.html b/releases/next/docs/native-modules-ios.html index 4ca5416289d..76e7fd3e289 100644 --- a/releases/next/docs/native-modules-ios.html +++ b/releases/next/docs/native-modules-ios.html @@ -4,9 +4,13 @@ @interface CalendarManager : NSObject <RCTBridgeModule> @end

In addition to implementing the RCTBridgeModule protocol, your class must also include the RCT_EXPORT_MODULE() macro. This takes an optional argument that specifies the name that the module will be accessible as in your JavaScript code (more on this later). If you do not specify a name, the JavaScript module name will match the Objective-C class name.

// CalendarManager.m @implementation CalendarManager - -RCT_EXPORT_MODULE(); - + +// To export a module named CalendarManager +RCT_EXPORT_MODULE(); + +// This would name the module AwesomeCalendarManager instead +// RCT_EXPORT_MODULE(AwesomeCalendarManager); + @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 <React/RCTLog.h> diff --git a/releases/next/docs/nativemethodsmixin.html b/releases/next/docs/nativemethodsmixin.html index c4b810f02bf..055cce397c4 100644 --- a/releases/next/docs/nativemethodsmixin.html +++ b/releases/next/docs/nativemethodsmixin.html @@ -18,7 +18,7 @@ arguments:

Note has been completed in native.

static measureLayout(relativeToNativeNode, onSuccess, onFail) #

Like measure(), but measures the view relative an ancestor, specified as relativeToNativeNode. This means that the returned x, y are relative to the origin x, y of the ancestor view.

As always, to obtain a native node handle for a component, you can use -React.findNodeHandle(component).

static focus(0) #

Requests focus for the given input or view. The exact behavior triggered +ReactNative.findNodeHandle(component).

static focus(0) #

Requests focus for the given input or view. The exact behavior triggered will depend on the platform and type of view.

static blur(0) #

Removes focus from an input or view. This is the opposite of focus().

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

← PrevNext →