diff --git a/docs/actionsheetios.html b/docs/actionsheetios.html index 1b618916bad..7f47f7f2249 100644 --- a/docs/actionsheetios.html +++ b/docs/actionsheetios.html @@ -1,4 +1,4 @@ -
Whether to show the indicator (true, the default) or hide it (false).
The foreground color of the spinner (default is gray).
Whether the indicator should hide when not animating (true by default).
Invoked on mount and layout changes with
{nativeEvent: { layout: {x, y, width, height}}}.
Size of the indicator. Small has a height of 20, large has a height of 36.
Whether to show the indicator (true, the default) or hide it (false).
The foreground color of the spinner (default is gray).
Whether the indicator should hide when not animating (true by default).
Invoked on mount and layout changes with
{nativeEvent: { layout: {x, y, width, height}}}.
Size of the indicator. Small has a height of 20, large has a height of 36.
Launches an alert dialog with the specified title and message.
Optionally provide a list of buttons. Tapping any button will fire the +
Launches an alert dialog with the specified title and message.
Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button
The last button in the list will be considered the 'Primary' button and it will appear bold.
Fluid, meaningful animations are essential to the mobile user +experience. Animation APIs for React Native are currently under heavy +development, the recommendations in this article are intended to be up +to date with the current best-practices.
requestAnimationFrame is a polyfill from the browser that you might be
+familiar with. It accepts a function as its only argument and calls that
+function before the next repaint. It is an essential building block for
+animations that underlies all of the JavaScript-based animation APIs.
These APIs do all of the calculations in JavaScript, then send over +updated properties to the native side on each frame.
react-tween-state is a
+minimal library that does exactly what its name suggests: it tweens a
+value in a component's state, starting at a from value and ending at
+a to value. This means that it generates the values in between those
+two values, and it sets the state on every requestAnimationFrame with
+the intermediary value.
Tweening definition from Wikipedia
"... tweening is the process of generating intermediate frames between two +images to give the appearance that the first image evolves smoothly +into the second image. [Tweens] are the drawings between the key +frames which help to create the illusion of motion."
The most obvious way to animate from one value to another is linearly: +you subtract the end value from the start value and divide the result by +the number of frames over which the animation occurs, and then add that +value to the current value on each frame until the end value is reached. +Linear easing often looks awkward and unnatural, so react-tween-state +provides a selection of popular easing functions +that can be applied to make your animations more pleasing.
This library does not ship with React Native - in order to use it on
+your project, you will need to install it with npm i react-tween-state
+--save from your project directory.

Here we animated the opacity, but as you might guess, we can animate any +numeric value. Read more about react-tween-state in its +README.
Rebound.js is a JavaScript port of
+Rebound for Android. It is
+similar in concept to react-tween-state: you have an initial value and
+set an end value, then Rebound generates intermediate values that you can
+use for your animation. Rebound is modeled after spring physics; we
+don't provide a duration when animating with springs, it is
+calculated for us depending on the spring tension, friction, current
+value and end value. Rebound is used
+internally
+by React Native on Navigator and WarningBox.

Notice that Rebound animations can be interrupted - if you release in +the middle of a press, it will animate back from the current state to +the original value.
You can also clamp the spring values so that they don't overshoot and
+oscillate around the end value. In the above example, we would add
+this._scrollSpring.setOvershootClampingEnabled(true) to change this.
+See the below gif for an example of where in your interface you might
+use this.
Screenshot from
+react-native-scrollable-tab-view.
+You can run a simlar example here.
As mentioned in the Direction Manipulation section,
+setNativeProps allows us to modify properties of native-backed
+components (components that are actually backed by native views, unlike
+composite components) directly, without having to setState and
+re-render the component hierarchy.
We could use this in the Rebound example to update the scale - this
+might be helpful if the component that we are updating is deeply nested
+and hasn't been optimized with shouldComponentUpdate.
It would not make sense to use setNativeProps with react-tween-state
+because the updated tween values are set on the state automatically by
+the library - Rebound on the other hand gives us an updated value for
+each frame with the onSpringUpdate function.
If you find your animations with dropping frames (performing below 60
+frames per second), look into using setNativeProps or
+shouldComponentUpdate to optimize them. You may also want to defer any
+computationally intensive work until after animations are complete,
+using the
+InteractionManager. You
+can monitor the frame rate by using the In-App Developer Menu "FPS
+Monitor" tool.
As mentioned in the Navigator
+Comparison,
+Navigator is implemented in JavaScript and NavigatorIOS is a wrapper
+around native functionality provided by UINavigationController, so
+these scene transitions apply only to Navigator. In order to re-create
+the various animations provided by UINavigationController and also
+make them customizable, React Native exposes a
+NavigatorSceneConfigs API.
For further information about customizing scene transitions, read the +source.
LayoutAnimation allows you to globally configure create and update
+animations that will be used for all views in the next render cycle.

This example uses a preset value, you can customize the animations as +you need, see LayoutAnimation.js +for more information.
As the name would suggest, this was only ever an experimental API and it +is not recommended to use this on your apps. It has some rough edges +and is not under active development. It is built on top of CoreAnimation +explicit animations.
If you choose to use it anyways, here is what you need to know:
RCTAnimationExperimental.xcodeproj and add
+libRCTAnimationExperimental.a to Build Phases.
Now to demonstrate a known issue, and one of the reasons why it is
+recommended not to use AnimationExperimental currently, let's try to
+animate opacity from 1 to 0.5:

Facebook Pop "supports spring and +decay dynamic animations, making it useful for building realistic, +physics-based interactions."
This is not officially supported or recommended because the direction is +to move towards JavaScript-driven animations, but if you must use it, +you can find the code to integrate with React Native +here. +Please do not open questions specific to Pop on the React Native issues, +StackOverflow is a better place to answer those questions as it is not +considered to be part of the core.
AppRegistry is the JS entry point to running all React Native apps. App
+
AppRegistry is the JS entry point to running all React Native apps. App
root components should register themselves with
AppRegistry.registerComponent, then the native system can load the bundle
for the app and then actually run the app when it's ready by invoking
diff --git a/docs/appstateios.html b/docs/appstateios.html
index b4ff6577687..80f27c6816a 100644
--- a/docs/appstateios.html
+++ b/docs/appstateios.html
@@ -1,4 +1,4 @@
-
AppStateIOS can tell you if the app is in the foreground or background,
+
AppStateIOS can tell you if the app is in the foreground or background,
and notify you when the state changes.
AppStateIOS is frequently used to determine the intent and proper behavior when handling push notifications.
active - The app is running in the foregroundbackground - The app is running in the background. The user is either
in another app or on the home screeninactive - This is a transition state that currently never happens for
diff --git a/docs/asyncstorage.html b/docs/asyncstorage.html
index 377a43951e8..6e5d85ee178 100644
--- a/docs/asyncstorage.html
+++ b/docs/asyncstorage.html
@@ -1,4 +1,4 @@
-AsyncStorage is a simple, asynchronous, persistent, key-value storage +
AsyncStorage is a simple, asynchronous, persistent, key-value storage system that is global to the app. It should be used instead of LocalStorage.
It is recommended that you use an abstraction on top of AsyncStorage instead of AsyncStorage directly for anything more than light usage since it operates globally.
This JS code is a simple facade over the native iOS implementation to provide diff --git a/docs/cameraroll.html b/docs/cameraroll.html index 4c91f207a34..194a2d24640 100644 --- a/docs/cameraroll.html +++ b/docs/cameraroll.html @@ -1,4 +1,4 @@ -
Saves the image with tag tag to the camera roll.
@param {string} tag - Can be any of the three kinds of tags we accept: +
Saves the image with tag tag to the camera roll.
@param {string} tag - Can be any of the three kinds of tags we accept: 1. URL 2. assets-library tag 3. tag returned from storing an image in memory
Invokes callback with photo identifier objects from the local camera
diff --git a/docs/datepickerios.html b/docs/datepickerios.html
index e538cde4720..8c9d36c596f 100644
--- a/docs/datepickerios.html
+++ b/docs/datepickerios.html
@@ -1,4 +1,4 @@
-
Use DatePickerIOS to render a date/time picker (selector) on iOS. This is
+
Use DatePickerIOS to render a date/time picker (selector) on iOS. This is
a controlled component, so you must hook in to the onDateChange callback
and update the date prop in order for the component to update, otherwise
the user's change will be reverted immediately to reflect props.date as the
diff --git a/docs/debugging.html b/docs/debugging.html
index ec1666935ee..db3af94838e 100644
--- a/docs/debugging.html
+++ b/docs/debugging.html
@@ -1,4 +1,4 @@
-
To access the in-app developer menu, shake the iOS device or press control + ⌘ + z in the simulator.
Hint
To disable the developer menu for production builds, open your project in Xcode and select
Product→Scheme→Edit Scheme...(or press⌘ + <). Next, selectRunfrom the menu on the left and change the Build Configuration toRelease.
Selecting Reload or pressing ⌘ + r in the simulator will reload the JavaScript that powers your application. If you have added new resources (such as an image to Images.xcassets) or modified any Objective-C/Swift code, you will need to re-build from Xcode for the changes to take effect (you can do this with ⌘ + r in Xcode).
To debug the JavaScript code in Chrome, select Debug in Chrome from the developer menu. This will open a new tab at http://localhost:8081/debugger-ui.
Press ⌘ + option + i or select View → Developer → Developer Tools to toggle the developer tools console. Enable Pause On Caught Exceptions for a better debugging experience.
To debug on a real device: Open the file RCTWebSocketExecutor.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging.
Install the React Developer Tools extension for Google Chrome. This will allow you to navigate the component hierarchy via the React in the developer tools (see facebook/react-devtools for more information).
Select Enable Live Reload via the developer menu to have the application automatically reload when changes are made to the JavaScript.
On 0.5.0-rc and higher versions, you can enable a FPS graph overlay in the developers menu in order to help you debug performance problems.
To access the in-app developer menu, shake the iOS device or press control + ⌘ + z in the simulator.
Hint
To disable the developer menu for production builds, open your project in Xcode and select
Product→Scheme→Edit Scheme...(or press⌘ + <). Next, selectRunfrom the menu on the left and change the Build Configuration toRelease.
Selecting Reload or pressing ⌘ + r in the simulator will reload the JavaScript that powers your application. If you have added new resources (such as an image to Images.xcassets) or modified any Objective-C/Swift code, you will need to re-build from Xcode for the changes to take effect (you can do this with ⌘ + r in Xcode).
To debug the JavaScript code in Chrome, select Debug in Chrome from the developer menu. This will open a new tab at http://localhost:8081/debugger-ui.
Press ⌘ + option + i or select View → Developer → Developer Tools to toggle the developer tools console. Enable Pause On Caught Exceptions for a better debugging experience.
To debug on a real device: Open the file RCTWebSocketExecutor.m and change localhost to the IP address of your computer. Shake the device to open the development menu with the option to start debugging.
Install the React Developer Tools extension for Google Chrome. This will allow you to navigate the component hierarchy via the React in the developer tools (see facebook/react-devtools for more information).
Select Enable Live Reload via the developer menu to have the application automatically reload when changes are made to the JavaScript.
On 0.5.0-rc and higher versions, you can enable a FPS graph overlay in the developers menu in order to help you debug performance problems.
It is sometimes necessary to make changes directly to a component +
It is sometimes necessary to make changes directly to a component without using state/props to trigger a re-render of the entire subtree. When using React in the browser for example, you sometimes need to directly modify a DOM node, and the same is true for views in mobile diff --git a/docs/embedded-app.html b/docs/embedded-app.html index a08611fa32d..2ab693c4d52 100644 --- a/docs/embedded-app.html +++ b/docs/embedded-app.html @@ -1,4 +1,4 @@ -
Since React makes no assumptions about the rest of your technology stack – it’s commonly noted as simply the V in MVC – it’s easily embeddable within an existing non-React Native app. In fact, it integrates with other best practice community tools like CocoaPods.
CocoaPods is a package management tool for iOS/Mac development. We need to use it to download React Native. If you haven't install CocoaPods yet, checkout this tutorial.
When you are ready to work with CocoaPods, add the following line to Podfile. If you don't have one, then create it under the root directory of your project.
Since React makes no assumptions about the rest of your technology stack – it’s commonly noted as simply the V in MVC – it’s easily embeddable within an existing non-React Native app. In fact, it integrates with other best practice community tools like CocoaPods.
CocoaPods is a package management tool for iOS/Mac development. We need to use it to download React Native. If you haven't install CocoaPods yet, checkout this tutorial.
When you are ready to work with CocoaPods, add the following line to Podfile. If you don't have one, then create it under the root directory of your project.
Remember to install all subspecs you need. The <Text> element cannot be used without pod 'React/RCTText'.
Then install your pods:
There are two pieces you’ll need to set up:
RCTRootView to display and manage your React Native componentsFirst, create a directory for your app’s React code and create a simple index.ios.js file:
Copy & paste following starter code for index.ios.js – it’s a barebones React Native app:
You need to include the NSLocationWhenInUseUsageDescription key
+
You need to include the NSLocationWhenInUseUsageDescription key
in Info.plist to enable geolocation. Geolocation is enabled by default
when you create a project with react-native init.
Geolocation follows the MDN specification: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
Invokes the success callback once with the latest location info. Supported diff --git a/docs/gesture-responder-system.html b/docs/gesture-responder-system.html index 4e85ea14593..c075023d136 100644 --- a/docs/gesture-responder-system.html +++ b/docs/gesture-responder-system.html @@ -1,4 +1,4 @@ -
Gesture recognition on mobile devices is much more complicated than web. A touch can go through several phases as the app determines what the user's intention is. For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. This can even change during the duration of a touch. There can also be multiple simultaneous touches.
The touch responder system is needed to allow components to negotiate these touch interactions without any additional knowledge about their parent or child components. This system is implemented in ResponderEventPlugin.js, which contains further details and documentation.
Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. Every action should have the following attributes:
These features make users more comfortable while using an app, because it allows people to experiment and interact without fear of making mistakes.
The responder system can be complicated to use. So we have provided an abstract Touchable implementation for things that should be "tappable". This uses the responder system and allows you to easily configure tap interactions declaratively. Use TouchableHighlight anywhere where you would use a button or link on web.
A view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder:
View.props.onStartShouldSetResponder: (evt) => true, - Does this view want to become responder on the start of a touch?View.props.onMoveShouldSetResponder: (evt) => true, - Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?If the View returns true and attempts to become the responder, one of the following will happen:
View.props.onResponderGrant: (evt) => {} - The View is now responding for touch events. This is the time to highlight and show the user what is happeningView.props.onResponderReject: (evt) => {} - Something else is the responder right now and will not release itIf the view is responding, the following handlers can be called:
View.props.onResponderMove: (evt) => {} - The user is moving their fingerView.props.onResponderRelease: (evt) => {} - Fired at the end of the touch, ie "touchUp"View.props.onResponderTerminationRequest: (evt) => true - Something else wants to become responder. Should this view release the responder? Returning true allows releaseView.props.onResponderTerminate: (evt) => {} - The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)evt is a synthetic touch event with the following form:
nativeEventchangedTouches - Array of all touch events that have changed since the last eventidentifier - The ID of the touchlocationX - The X position of the touch, relative to the elementlocationY - The Y position of the touch, relative to the elementpageX - The X position of the touch, relative to the screenpageY - The Y position of the touch, relative to the screentarget - The node id of the element receiving the touch eventtimestamp - A time identifier for the touch, useful for velocity calculationtouches - Array of all current touches on the screenonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable.
However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing on*ShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.
View.props.onStartShouldSetResponderCapture: (evt) => true,View.props.onMoveShouldSetResponderCapture: (evt) => true,For higher-level gesture interpretation, check out PanResponder.
Gesture recognition on mobile devices is much more complicated than web. A touch can go through several phases as the app determines what the user's intention is. For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. This can even change during the duration of a touch. There can also be multiple simultaneous touches.
The touch responder system is needed to allow components to negotiate these touch interactions without any additional knowledge about their parent or child components. This system is implemented in ResponderEventPlugin.js, which contains further details and documentation.
Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes. Every action should have the following attributes:
These features make users more comfortable while using an app, because it allows people to experiment and interact without fear of making mistakes.
The responder system can be complicated to use. So we have provided an abstract Touchable implementation for things that should be "tappable". This uses the responder system and allows you to easily configure tap interactions declaratively. Use TouchableHighlight anywhere where you would use a button or link on web.
A view can become the touch responder by implementing the correct negotiation methods. There are two methods to ask the view if it wants to become responder:
View.props.onStartShouldSetResponder: (evt) => true, - Does this view want to become responder on the start of a touch?View.props.onMoveShouldSetResponder: (evt) => true, - Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?If the View returns true and attempts to become the responder, one of the following will happen:
View.props.onResponderGrant: (evt) => {} - The View is now responding for touch events. This is the time to highlight and show the user what is happeningView.props.onResponderReject: (evt) => {} - Something else is the responder right now and will not release itIf the view is responding, the following handlers can be called:
View.props.onResponderMove: (evt) => {} - The user is moving their fingerView.props.onResponderRelease: (evt) => {} - Fired at the end of the touch, ie "touchUp"View.props.onResponderTerminationRequest: (evt) => true - Something else wants to become responder. Should this view release the responder? Returning true allows releaseView.props.onResponderTerminate: (evt) => {} - The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationRequest, or might be taken by the OS without asking (happens with control center/ notification center on iOS)evt is a synthetic touch event with the following form:
nativeEventchangedTouches - Array of all touch events that have changed since the last eventidentifier - The ID of the touchlocationX - The X position of the touch, relative to the elementlocationY - The Y position of the touch, relative to the elementpageX - The X position of the touch, relative to the screenpageY - The Y position of the touch, relative to the screentarget - The node id of the element receiving the touch eventtimestamp - A time identifier for the touch, useful for velocity calculationtouches - Array of all current touches on the screenonStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is called first. That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers. This is desirable in most cases, because it makes sure all controls and buttons are usable.
However, sometimes a parent will want to make sure that it becomes responder. This can be handled by using the capture phase. Before the responder system bubbles up from the deepest component, it will do a capture phase, firing on*ShouldSetResponderCapture. So if a parent View wants to prevent the child from becoming responder on a touch start, it should have a onStartShouldSetResponderCapture handler which returns true.
View.props.onStartShouldSetResponderCapture: (evt) => true,View.props.onMoveShouldSetResponderCapture: (evt) => true,For higher-level gesture interpretation, check out PanResponder.
brew install node. New to node or npm?brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.brew install flow. If you want to use flow.npm install -g react-native-clireact-native init AwesomeProjectIn the newly created folder AwesomeProject/
AwesomeProject.xcodeproj and hit run in Xcode.index.ios.js in your text editor of choice and edit some lines.Congratulations! You've just successfully run and modified your first React Native app.
If you run into any issues getting started, see the troubleshooting page.
brew install node. New to node or npm?brew install watchman. We recommend installing watchman, otherwise you might hit a node file watching bug.brew install flow. If you want to use flow.npm install -g react-native-clireact-native init AwesomeProjectIn the newly created folder AwesomeProject/
AwesomeProject.xcodeproj and hit run in Xcode.index.ios.js in your text editor of choice and edit some lines.Congratulations! You've just successfully run and modified your first React Native app.
If you run into any issues getting started, see the troubleshooting page.
A React component for displaying different types of images, +
A React component for displaying different types of images, including network images, static resources, temporary local images, and images from local disk, such as the camera roll.
Example usage:
InteractionManager allows long-running work to be scheduled after any +
InteractionManager allows long-running work to be scheduled after any interactions/animations have completed. In particular, this allows JavaScript animations to run smoothly.
Applications can schedule tasks to run after interactions with the following:
When using React Native, you're going to be running your JavaScript code in two environments:
While both environments are very similar, you may end up hitting some inconsistencies. We're likely going to experiment with other JS engines in the future, so it's best to avoid relying on specifics of any runtime.
Syntax transformers make writing code more enjoyable by allowing you to use new JavaScript syntax without having to wait for support on all interpreters.
As of version 0.5.0, React Native ships with the Babel JavaScript compiler. Check Babel documentation on its supported transformations for more details.
Here's a full list of React Native's enabled transformations.
ES5
promise.catch(function() { });ES6
<C onPress={() => this.setState({pressed: true})}Math.max(...array);class C extends React.Component { render() { return <View />; } }var {isActive, style} = this.props;var key = 'abc'; var obj = {[key]: 10};var obj = { method() { return 10; } };var name = 'vjeux'; var obj = { name };function(type, ...args) { }var who = 'world'; var str = `Hello ${who}`;ES7
var extended = { ...obj, a: 10 };function f(a, b, c,) { }When using React Native, you're going to be running your JavaScript code in two environments:
While both environments are very similar, you may end up hitting some inconsistencies. We're likely going to experiment with other JS engines in the future, so it's best to avoid relying on specifics of any runtime.
Syntax transformers make writing code more enjoyable by allowing you to use new JavaScript syntax without having to wait for support on all interpreters.
As of version 0.5.0, React Native ships with the Babel JavaScript compiler. Check Babel documentation on its supported transformations for more details.
Here's a full list of React Native's enabled transformations.
ES5
promise.catch(function() { });ES6
<C onPress={() => this.setState({pressed: true})}Math.max(...array);class C extends React.Component { render() { return <View />; } }var {isActive, style} = this.props;var key = 'abc'; var obj = {[key]: 10};var obj = { method() { return 10; } };var name = 'vjeux'; var obj = { name };function(type, ...args) { }var who = 'world'; var str = `Hello ${who}`;ES7
var extended = { ...obj, a: 10 };function f(a, b, c,) { }Not every app uses all the native capabilities, and including the code to support +
Not every app uses all the native capabilities, and including the code to support all those features would impact the binary size... But we still want to make it easy to add these features whenever you need them.
With that in mind we exposed many of these features as independent static libraries.
For most of the libs it will be as simple as dragging two files, sometimes a third step will be necessary, but no more than that.
All the libraries we ship with React Native live on the If your app was launched from a external url registered to your app you can
access and handle it from any component you want with ListView - A core component designed for efficient display of vertically
+ ListView - A core component designed for efficient display of vertically
scrolling lists of changing data. The minimal API is to create a
Map annotations with title/subtitle. Insets for the map's legal label, originally at bottom left of the map.
+ Map annotations with title/subtitle. Insets for the map's legal label, originally at bottom left of the map.
See The map type to be displayed. Maximum size of area that can be displayed. Minimum size of area that can be displayed. Callback that is called continuously when the user is dragging the map. Callback that is called once, when the user is done moving the map. When this property is set to There are tons of native UI widgets out there ready to be used in the latest apps - some of them are part of the platform, others are available as third-party libraries, and still more might be in use in your very own portfolio. React Native has several of the most critical platform components already wrapped, like Like the native module guide, this too is a more advanced guide that assumes you are somewhat familiar with iOS programming. This guide will show you how to build a native UI component, walking you through the implementation of a subset of the existing Let's say we want to add an interactive Map to our app - might as well use Native views are created and manipulated by subclasses of Vending a view is simple: There are tons of native UI widgets out there ready to be used in the latest apps - some of them are part of the platform, others are available as third-party libraries, and still more might be in use in your very own portfolio. React Native has several of the most critical platform components already wrapped, like Like the native module guide, this too is a more advanced guide that assumes you are somewhat familiar with iOS programming. This guide will show you how to build a native UI component, walking you through the implementation of a subset of the existing Let's say we want to add an interactive Map to our app - might as well use Native views are created and manipulated by subclasses of Vending a view is simple: Sometimes an app needs access to platform API, and React Native doesn't have a corresponding module yet. Maybe you want to reuse some existing Objective-C, Swift or C++ code without having to reimplement it in JavaScript, or write some high performance, multi-threaded code such as for image processing, a database, or any number of advanced extensions. We designed React Native such that it is possible for you to write real native code and have access to the full power of the platform. This is a more advanced feature and we don't expect it to be part of the usual development process, however it is essential that it exists. If React Native doesn't support a native feature that you need, you should be able to build it yourself. This is a more advanced guide that shows how to build a native module. It assumes the reader knows Objective-C or Swift and core libraries (Foundation, UIKit). This guide will use the iOS Calendar API example. Let's say we would like to be able to access the iOS calendar from JavaScript. A native module is just an Objective-C class that implements the Sometimes an app needs access to platform API, and React Native doesn't have a corresponding module yet. Maybe you want to reuse some existing Objective-C, Swift or C++ code without having to reimplement it in JavaScript, or write some high performance, multi-threaded code such as for image processing, a database, or any number of advanced extensions. We designed React Native such that it is possible for you to write real native code and have access to the full power of the platform. This is a more advanced feature and we don't expect it to be part of the usual development process, however it is essential that it exists. If React Native doesn't support a native feature that you need, you should be able to build it yourself. This is a more advanced guide that shows how to build a native module. It assumes the reader knows Objective-C or Swift and core libraries (Foundation, UIKit). This guide will use the iOS Calendar API example. Let's say we would like to be able to access the iOS calendar from JavaScript. A native module is just an Objective-C class that implements the The differences between Navigator
+ The differences between Navigator
and NavigatorIOS are a common
source of confusion for newcomers. Both Use Use To change the animation or gesture properties of the scene, provide a
diff --git a/docs/navigatorios.html b/docs/navigatorios.html
index d7e4206d220..ac7331ddff3 100644
--- a/docs/navigatorios.html
+++ b/docs/navigatorios.html
@@ -1,4 +1,4 @@
- NavigatorIOS wraps UIKit navigation and allows you to add back-swipe
+ NavigatorIOS wraps UIKit navigation and allows you to add back-swipe
functionality across your app. A route is an object used to describe each page in the navigator. The first
route is provided to NavigatorIOS as Libraries folder in
diff --git a/docs/linkingios.html b/docs/linkingios.html
index 99137b3557c..4b462bb01b0 100644
--- a/docs/linkingios.html
+++ b/docs/linkingios.html
@@ -1,4 +1,4 @@
-LinkingIOS
LinkingIOS gives you a general interface to interact with both, incoming
+LinkingIOS
LinkingIOS gives you a general interface to interact with both, incoming
and outgoing app links.Basic Usage #
Handling deep links #
ListView
ListView
ListView.DataSource, populate it with a simple array of data blobs, and
instantiate a ListView component with that data source and a renderRow
diff --git a/docs/mapview.html b/docs/mapview.html
index 0bf31dfbbe0..042acf5c1c3 100644
--- a/docs/mapview.html
+++ b/docs/mapview.html
@@ -1,4 +1,4 @@
-MapView
Edit on GitHubProps #
annotations [{latitude: number, longitude: number, title: string, subtitle: string}] #
legalLabelInsets {top: number, left: number, bottom: number, right: number} #
MapView
Edit on GitHubProps #
annotations [{latitude: number, longitude: number, title: string, subtitle: string}] #
legalLabelInsets {top: number, left: number, bottom: number, right: number} #
EdgeInsetsPropType.js for more information.mapType enum('standard', 'satellite', 'hybrid') #
maxDelta number #
minDelta number #
onRegionChange function #
onRegionChangeComplete function #
pitchEnabled bool #
true and a valid camera is associated
with the map, the camera’s pitch angle is used to tilt the plane
of the map. When this property is set to false, the camera’s pitch
diff --git a/docs/nativecomponentsios.html b/docs/nativecomponentsios.html
index e7ffd009413..c42dc571283 100644
--- a/docs/nativecomponentsios.html
+++ b/docs/nativecomponentsios.html
@@ -1,4 +1,4 @@
-Native UI Components (iOS)
ScrollView and TextInput, but not all of them, and certainly not ones you might have written yourself for a previous app. Fortunately, it's quite easy to wrap up these existing components for seamless integration with your React Native application.MapView component available in the core React Native library.iOS MapView example #
MKMapView, we just need to make it usable from JavaScript.RCTViewManager. These subclasses are similar in function to view controllers, but are essentially singletons - only one instance of each is created by the bridge. They vend native views to the RCTUIManager, which delegates back to them to set and update the properties of the views as necessary. The RCTViewManagers are also typically the delegates for the views, sending events back to JavaScript via the bridge.RCT_EXPORT_MODULE() marker macro.-(UIView *)view methodNative UI Components (iOS)
ScrollView and TextInput, but not all of them, and certainly not ones you might have written yourself for a previous app. Fortunately, it's quite easy to wrap up these existing components for seamless integration with your React Native application.MapView component available in the core React Native library.iOS MapView example #
MKMapView, we just need to make it usable from JavaScript.RCTViewManager. These subclasses are similar in function to view controllers, but are essentially singletons - only one instance of each is created by the bridge. They vend native views to the RCTUIManager, which delegates back to them to set and update the properties of the views as necessary. The RCTViewManagers are also typically the delegates for the views, sending events back to JavaScript via the bridge.RCT_EXPORT_MODULE() marker macro.-(UIView *)view methodNative Modules (iOS)
iOS Calendar Module Example #
RCTBridgeModule protocol. If you are wondering, RCT is an abbreviation of ReaCT.Native Modules (iOS)
iOS Calendar Module Example #
RCTBridgeModule protocol. If you are wondering, RCT is an abbreviation of ReaCT.Navigator Comparison
Navigator Comparison
Navigator and NavigatorIOS are components that allow you to
manage the navigation in your app between various "scenes" (another word
diff --git a/docs/navigator.html b/docs/navigator.html
index 8167959f685..9205572c5ff 100644
--- a/docs/navigator.html
+++ b/docs/navigator.html
@@ -1,4 +1,4 @@
-Navigator
Navigator to transition between different scenes in your app. To
+Navigator
Navigator to transition between different scenes in your app. To
accomplish this, provide route objects to the navigator to identify each
scene, and also a renderScene function that the navigator can use to
render the scene for a given route.NavigatorIOS
NavigatorIOS
Routes #
initialRoute:NetInfo
Methods #
Edit on GitHubExamples #
NetInfo
Methods #
Edit on GitHubExamples #