diff --git a/docs/alertios.html b/docs/alertios.html index a7e76e762cc..9a809562335 100644 --- a/docs/alertios.html +++ b/docs/alertios.html @@ -1,7 +1,7 @@ React Native | A framework for building native apps using React

AlertIOS

AlertIOS manages native iOS alerts, option sheets, and share dialogs

Methods #

static alert(title: string, message?: string, buttons?: Array<{ text: ?string; onPress: ?Function; - }>) #

Edit on GitHubExamples #

'use strict'; + }>) #

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); var { diff --git a/docs/appstateios.html b/docs/appstateios.html index bdac3c8807f..543dc3875df 100644 --- a/docs/appstateios.html +++ b/docs/appstateios.html @@ -26,7 +26,7 @@ render: funct },

This example will only ever appear to say "Current state is: active" because the app is only visible to the user when in the active state, and the null state will happen only momentarily.

Methods #

static addEventListener(type: string, handler: Function) #

Add a handler to AppState changes by listening to the change event type -and providing the handler

static removeEventListener(type: string, handler: Function) #

Remove a handler by passing the change event type and the handler

Edit on GitHubExamples #

'use strict'; +and providing the handler

static removeEventListener(type: string, handler: Function) #

Remove a handler by passing the change event type and the handler

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); var { diff --git a/docs/asyncstorage.html b/docs/asyncstorage.html index 87aca01997e..490cd28fa9b 100644 --- a/docs/asyncstorage.html +++ b/docs/asyncstorage.html @@ -9,7 +9,7 @@ don't want to call this - use removeItem or multiRemove to clear only your own keys instead.

static getAllKeys(callback: (error: ?Error) => void) #

Gets all keys known to the system, for all callers, libraries, etc.

static multiGet(keys: Array<string>, callback: (errors: ?Array<Error>, result: ?Array<Array<string>>) => void) #

multiGet invokes callback with an array of key-value pair arrays that matches the input format of multiSet.

multiGet(['k1', 'k2'], cb) -> cb([['k1', 'val1'], ['k2', 'val2']])

static multiSet(keyValuePairs: Array<Array<string>>, callback: ?(errors: ?Array<Error>) => void) #

multiSet and multiMerge take arrays of key-value array pairs that match the output of multiGet, e.g.

multiSet([['k1', 'val1'], ['k2', 'val2']], cb);

static multiRemove(keys: Array<string>, callback: ?(errors: ?Array<Error>) => void) #

Delete all the keys in the keys array.

static multiMerge(keyValuePairs: Array<Array<string>>, callback: ?(errors: ?Array<Error>) => void) #

Merges existing values with input values, assuming they are stringified -json.

Not supported by all native implementations.

Edit on GitHubExamples #

'use strict'; +json.

Not supported by all native implementations.

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); var { diff --git a/docs/geolocation.html b/docs/geolocation.html index 390fc925408..fed69fe25d1 100644 --- a/docs/geolocation.html +++ b/docs/geolocation.html @@ -3,7 +3,7 @@ You need to add NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation, otherwise it's going to fail silently! !/ !/

Geolocation follows the MDN specification: -https://developer.mozilla.org/en-US/docs/Web/API/Geolocation

Methods #

static getCurrentPosition(geo_success: Function, geo_error?: Function, geo_options?: Object) #

static watchPosition(success: Function, error?: Function, options?: Object) #

static clearWatch(watchID: number) #

static stopObserving() #

Edit on GitHubExamples #

'use strict'; +https://developer.mozilla.org/en-US/docs/Web/API/Geolocation

Methods #

static getCurrentPosition(geo_success: Function, geo_error?: Function, geo_options?: Object) #

static watchPosition(success: Function, error?: Function, options?: Object) #

static clearWatch(watchID: number) #

static stopObserving() #

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); diff --git a/docs/image.html b/docs/image.html index adf9badf04b..ccf549f15de 100644 --- a/docs/image.html +++ b/docs/image.html @@ -31,7 +31,7 @@ testing scripts.

// GOOD var icon = this.props.active ? require('image!my-icon-active') : require('image!my-icon-inactive'); -<Image source={icon} />

When your entire codebase respects this convention, you're able to do interesting things like automatically packaging the assets that are being used in your app. Note that in the current form, nothing is enforced, but it will be in the future.

Best Camera Roll Image #

iOS saves multiple sizes for the same image in your Camera Roll, it is very important to pick the one that's as close as possible for performance reasons. You wouldn't want to use the full quality 3264x2448 image as source when displaying a 200x200 thumbnail. If there's an exact match, React Native will pick it, otherwise it's going to use the first one that's at least 50% bigger in order to avoid blur when resizing from a close size. All of this is done by default so you don't have to worry about writing the tedious (and error prone) code to do it yourself.

Source being an object #

In React Native, one interesting decision is that the src attribute is named source and doesn't take a string but an object with an uri attribute.

<Image source={{uri: 'something.jpg'}} />

On the infrastructure side, the reason is that it allows to attach metadata to this object. For example if you are using require('image!icon'), then we add an isStatic attribute to flag it as a local file (don't rely on this fact, it's likely to change in the future!). This is also future proofing, for example we may want to support sprites at some point, instead of outputting {uri: ...}, we can output {uri: ..., crop: {left: 10, top: 50, width: 20, height: 40}} and transparently support spriting on all the existing call sites.

On the user side, this lets you annotate the object with useful attributes such as the dimension of the image in order to compute the size it's going to be displayed in. Feel free to use it as your data structure to store more information about your image.

Edit on GitHubExamples #

'use strict'; +<Image source={icon} />

When your entire codebase respects this convention, you're able to do interesting things like automatically packaging the assets that are being used in your app. Note that in the current form, nothing is enforced, but it will be in the future.

Best Camera Roll Image #

iOS saves multiple sizes for the same image in your Camera Roll, it is very important to pick the one that's as close as possible for performance reasons. You wouldn't want to use the full quality 3264x2448 image as source when displaying a 200x200 thumbnail. If there's an exact match, React Native will pick it, otherwise it's going to use the first one that's at least 50% bigger in order to avoid blur when resizing from a close size. All of this is done by default so you don't have to worry about writing the tedious (and error prone) code to do it yourself.

Source being an object #

In React Native, one interesting decision is that the src attribute is named source and doesn't take a string but an object with an uri attribute.

<Image source={{uri: 'something.jpg'}} />

On the infrastructure side, the reason is that it allows to attach metadata to this object. For example if you are using require('image!icon'), then we add an isStatic attribute to flag it as a local file (don't rely on this fact, it's likely to change in the future!). This is also future proofing, for example we may want to support sprites at some point, instead of outputting {uri: ...}, we can output {uri: ..., crop: {left: 10, top: 50, width: 20, height: 40}} and transparently support spriting on all the existing call sites.

On the user side, this lets you annotate the object with useful attributes such as the dimension of the image in order to compute the size it's going to be displayed in. Feel free to use it as your data structure to store more information about your image.

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); var { diff --git a/docs/mapview.html b/docs/mapview.html index fc02cfc74a4..9fd74fe110b 100644 --- a/docs/mapview.html +++ b/docs/mapview.html @@ -14,7 +14,7 @@ Default value is false.

NOTE: You need to ad Info.plist to enable geolocation, otherwise it is going to fail silently!

style View#style #

Used to style and layout the MapView. See StyleSheet.js and ViewStylePropTypes.js for more info.

zoomEnabled bool #

If false the user won't be able to pinch/zoom the map. -Default value is true.

Edit on GitHubExamples #

'use strict'; +Default value is true.

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); var StyleSheet = require('StyleSheet'); diff --git a/docs/navigatorios.html b/docs/navigatorios.html index 92efeae4221..6118df89da3 100644 --- a/docs/navigatorios.html +++ b/docs/navigatorios.html @@ -36,7 +36,7 @@ transitions back to it
  • resetTo(route) - Replaces the top it });
  • Edit on GitHubProps #

    initialRoute {component: function, title: string, passProps: object, backButtonTitle: string, rightButtonTitle: string, onRightButtonPress: function, wrapperStyle: [object Object]} #

    NavigatorIOS uses "route" objects to identify child views, their props, and navigation bar configuration. "push" and all the other navigation operations expect routes to be like this:

    itemWrapperStyle View#style #

    The default wrapper style for components in the navigator. -A common use case is to set the backgroundColor for every page

    tintColor string #

    The color used for buttons in the navigation bar

    Edit on GitHubExamples #

    'use strict'; +A common use case is to set the backgroundColor for every page

    tintColor string #

    The color used for buttons in the navigation bar

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var ViewExample = require('./ViewExample'); diff --git a/docs/netinfo.html b/docs/netinfo.html index b32cf1fa8f5..1575fe83775 100644 --- a/docs/netinfo.html +++ b/docs/netinfo.html @@ -25,7 +25,7 @@ internet connectivity.

    NetInfo.isConnected.addEventListener( 'change', handleFirstConnectivityChange -);

    Edit on GitHubExamples #

    'use strict'; +);

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/scrollview.html b/docs/scrollview.html index ce9f051a32c..a1d89f393c7 100644 --- a/docs/scrollview.html +++ b/docs/scrollview.html @@ -39,7 +39,7 @@ The default value is true.

    style style #

    backgroundColor string
    borderBottomColor string
    borderColor string
    borderLeftColor string
    borderRadius number
    borderRightColor string
    borderTopColor string
    opacity number
    overflow enum('visible', 'hidden')
    rotation number
    scaleX number
    scaleY number
    shadowColor string
    shadowOffset {h: number, w: number}
    shadowOpacity number
    shadowRadius number
    transformMatrix [number]
    translateX number
    translateY number

    zoomScale number #

    The current scale of the scroll view content. The default value is 1.0.

    Edit on GitHubExamples #

    'use strict'; +with horizontal={true}.

    style style #

    backgroundColor string
    borderBottomColor string
    borderColor string
    borderLeftColor string
    borderRadius number
    borderRightColor string
    borderTopColor string
    opacity number
    overflow enum('visible', 'hidden')
    rotation number
    scaleX number
    scaleY number
    shadowColor string
    shadowOffset {h: number, w: number}
    shadowOpacity number
    shadowRadius number
    transformMatrix [number]
    translateX number
    translateY number

    zoomScale number #

    The current scale of the scroll view content. The default value is 1.0.

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/sliderios.html b/docs/sliderios.html index eabdc073372..bf4ef6e92c5 100644 --- a/docs/sliderios.html +++ b/docs/sliderios.html @@ -3,7 +3,7 @@ the slider is released).

    ViewStylePropTypes.js for more info.

    value number #

    Initial value of the slider. The value should be between minimumValue and maximumValue, which default to 0 and 1 respectively. Default value is 0.

    This is not a controlled component, e.g. if you don't update -the value, the component won't be reset to it's inital value.

    Edit on GitHubExamples #

    'use strict'; +the value, the component won't be reset to it's inital value.

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/statusbarios.html b/docs/statusbarios.html index 75274f6c72f..5b92ef797b2 100644 --- a/docs/statusbarios.html +++ b/docs/statusbarios.html @@ -1,6 +1,6 @@ React Native | A framework for building native apps using React

    StatusBarIOS

    All rights reserved.

    This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant -of patent rights can be found in the PATENTS file in the same directory.

    @flow

    Methods #

    static setStyle(style: number, animated?: boolean) #

    static setHidden(hidden: boolean, animation: number) #

    Edit on GitHubExamples #

    'use strict'; +of patent rights can be found in the PATENTS file in the same directory.

    @flow

    Methods #

    static setStyle(style: number, animated?: boolean) #

    static setHidden(hidden: boolean, animation: number) #

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/textinput.html b/docs/textinput.html index 26358a5b77b..8b781e73233 100644 --- a/docs/textinput.html +++ b/docs/textinput.html @@ -25,7 +25,7 @@ this true, but you will probably see flickering, dropped keystrokes, and/or laggy typing, depending on how you process onChange events.

    editable bool #

    If false, text is not editable. Default value is true.

    enablesReturnKeyAutomatically bool #

    If true, the keyboard disables the return key when there is no text and automatically enables it when there is text. Default value is false.

    keyboardType enum('default', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'email-address', 'decimal-pad', 'twitter', 'web-search', "numeric") #

    Determines which keyboard to open, e.g.numeric.

    multiline bool #

    If true, the text input can be multiple lines. Default value is false.

    onBlur function #

    Callback that is called when the text input is blurred

    onChange function #

    (text: string) => void

    Callback that is called when the text input's text changes.

    onChangeText function #

    onEndEditing function #

    onFocus function #

    Callback that is called when the text input is focused

    onSubmitEditing function #

    password bool #

    If true, the TextInput will be a password field. Default value is false.

    placeholder string #

    The string that will be rendered before text input has been entered

    placeholderTextColor string #

    The text color of the placeholder string

    returnKeyType enum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call') #

    Determines how the return key should look.

    secureTextEntry bool #

    If true, the text input obscures the text entered so that sensitive text like passwords stay secure. Default value is false.

    selectionState DocumentSelectionState #

    See DocumentSelectionState.js, some state that is responsible for -maintaining selection information for a document

    testID string #

    Used to locate this view in end-to-end tests.

    value string #

    The default value for the text input

    Edit on GitHubExamples #

    'use strict'; +maintaining selection information for a document

    testID string #

    Used to locate this view in end-to-end tests.

    value string #

    The default value for the text input

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/vibrationios.html b/docs/vibrationios.html index 1bb90b78ed6..862cb074473 100644 --- a/docs/vibrationios.html +++ b/docs/vibrationios.html @@ -1,7 +1,7 @@ React Native | A framework for building native apps using React

    VibrationIOS

    The Vibration API is exposed at VibrationIOS.vibrate(). On iOS, calling this function will trigger a one second vibration. The vibration is asynchronous so this method will return immediately.

    There will be no effect on devices that do not support Vibration, eg. the iOS -simulator.

    Vibration patterns are currently unsupported.

    Methods #

    static vibrate() #

    Edit on GitHubExamples #

    'use strict'; +simulator.

    Vibration patterns are currently unsupported.

    Methods #

    static vibrate() #

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/view.html b/docs/view.html index fac30555120..f760e2c68dd 100644 --- a/docs/view.html +++ b/docs/view.html @@ -34,7 +34,7 @@ for scrolling content when there are many subviews, most of which are offscreen. For this property to be effective, it must be applied to a view that contains many subviews that extend outside its bound. The subviews must also have overflow: hidden, as should the containing view -(or one of its superviews).

    style style #

    backgroundColor string
    borderBottomColor string
    borderColor string
    borderLeftColor string
    borderRadius number
    borderRightColor string
    borderTopColor string
    opacity number
    overflow enum('visible', 'hidden')
    rotation number
    scaleX number
    scaleY number
    shadowColor string
    shadowOffset {h: number, w: number}
    shadowOpacity number
    shadowRadius number
    transformMatrix [number]
    translateX number
    translateY number

    testID string #

    Used to locate this view in end-to-end tests.

    Edit on GitHubExamples #

    'use strict'; +(or one of its superviews).

    style style #

    backgroundColor string
    borderBottomColor string
    borderColor string
    borderLeftColor string
    borderRadius number
    borderRightColor string
    borderTopColor string
    opacity number
    overflow enum('visible', 'hidden')
    rotation number
    scaleX number
    scaleY number
    shadowColor string
    shadowOffset {h: number, w: number}
    shadowOpacity number
    shadowRadius number
    transformMatrix [number]
    translateX number
    translateY number

    testID string #

    Used to locate this view in end-to-end tests.

    Edit on GitHubExamples #

    'use strict'; var React = require('react-native'); var { diff --git a/docs/webview.html b/docs/webview.html index ced5c23ddc8..861f8f4d39e 100644 --- a/docs/webview.html +++ b/docs/webview.html @@ -1,4 +1,4 @@ -React Native | A framework for building native apps using React

    WebView

    Edit on GitHubProps #

    automaticallyAdjustContentInsets bool #

    contentInset {top: number, left: number, bottom: number, right: number} #

    onNavigationStateChange function #

    renderError function #

    renderLoading function #

    shouldInjectAJAXHandler bool #

    startInLoadingState bool #

    url string #

    Edit on GitHubExamples #

    'use strict'; +React Native | A framework for building native apps using React