diff --git a/docs/pushnotificationios.html b/docs/pushnotificationios.html index 45604b44e37..b2df5792365 100644 --- a/docs/pushnotificationios.html +++ b/docs/pushnotificationios.html @@ -1,8 +1,18 @@ React Native | A framework for building native apps using React

PushNotificationIOS

Handle push notifications for your app, including permission handling and icon badge number.

To get up and running, configure your notifications with Apple -and your server-side system. To get an idea, this is the Parse guide.

Methods #

static setApplicationIconBadgeNumber(number: number) #

Sets the badge number for the app icon on the home screen

static getApplicationIconBadgeNumber(callback: Function) #

Gets the current badge number for the app icon on the home screen

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

Attaches a listener to remote notifications while the app is running in the -foreground or the background.

The handler will get be invoked with an instance of PushNotificationIOS

static requestPermissions() #

Requests all notification permissions from iOS, prompting the user's -dialog box.

static checkPermissions(callback: Function) #

See what push permissions are currently enabled. callback will be +and your server-side system. To get an idea, this is the Parse guide.

Methods #

static setApplicationIconBadgeNumber(number: number) #

Sets the badge number for the app icon on the home screen

static getApplicationIconBadgeNumber(callback: Function) #

Gets the current badge number for the app icon on the home screen

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

Attaches a listener to remote notification events while the app is running +in the foreground or the background.

Valid events are:

  • notification : Fired when a remote notification is received. The +handler will be invoked with an instance of PushNotificationIOS.
  • register: Fired when the user registers for remote notifications. The +handler will be invoked with a hex string representing the deviceToken.

static requestPermissions(permissions?: { + alert?: boolean, + badge?: boolean, + sound?: boolean + }) #

Requests notification permissions from iOS, prompting the user's +dialog box. By default, it will request all notification permissions, but +a subset of these can be requested by passing a map of requested +permissions. +The following permissions are supported:

  • alert
  • badge
  • sound

If a map is provided to the method, only the permissions with truthy values +will be requested.

static checkPermissions(callback: Function) #

See what push permissions are currently enabled. callback will be invoked with a permissions object:

  • alert :boolean
  • badge :boolean
  • sound :boolean

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

Removes the event listener. Do this in componentWillUnmount to prevent memory leaks

static popInitialNotification() #

An initial notification will be available if the app was cold-launched from a notification.

The first caller of popInitialNotification will get the initial diff --git a/docs/scrollview.html b/docs/scrollview.html index 37a4221af84..8ba9040b8e2 100644 --- a/docs/scrollview.html +++ b/docs/scrollview.html @@ -28,7 +28,7 @@ decelerates after the user lifts their finger. Reasonable choices include - Normal: 0.998 (the default) - Fast: 0.9

directionalLockEnabled bool #

When true, the ScrollView will try to lock to only vertical or horizontal scrolling while dragging. The default value is false.

horizontal bool #

When true, the scroll view's children are arranged horizontally in a row -instead of vertically in a column. The default value is false.

keyboardDismissMode enum("none", 'interactive', 'onDrag') #

Determines whether the keyboard gets dismissed in response to a drag. +instead of vertically in a column. The default value is false.

keyboardDismissMode enum("none", 'interactive', 'on-drag') #

Determines whether the keyboard gets dismissed in response to a drag. - 'none' (the default), drags do not dismiss the keyboard. - 'onDrag', the keyboard is dismissed when a drag begins. - 'interactive', the keyboard is dismissed interactively with the drag diff --git a/docs/statusbarios.html b/docs/statusbarios.html index 1c3a9a0b6ff..a39b16ae64f 100644 --- a/docs/statusbarios.html +++ b/docs/statusbarios.html @@ -1,4 +1,4 @@ -React Native | A framework for building native apps using React

StatusBarIOS

Methods #

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

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

Edit on GitHubExamples #

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

StatusBarIOS

Methods #

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

static setHidden(hidden: boolean, animation?: StatusBarAnimation) #

Edit on GitHubExamples #

'use strict'; var React = require('react-native'); var { @@ -17,11 +17,11 @@ exports.examples render() { return ( <View> - {Object.keys(StatusBarIOS.Style).map((key) => + {['default', 'light-content'].map((style) => <TouchableHighlight style={styles.wrapper} - onPress={() => StatusBarIOS.setStyle(StatusBarIOS.Style[key])}> + onPress={() => StatusBarIOS.setStyle(style)}> <View style={styles.button}> - <Text>setStyle(StatusBarIOS.Style.{key})</Text> + <Text>setStyle('{style}')</Text> </View> </TouchableHighlight> )} @@ -33,11 +33,11 @@ exports.examples render() { return ( <View> - {Object.keys(StatusBarIOS.Style).map((key) => + {['default', 'light-content'].map((style) => <TouchableHighlight style={styles.wrapper} - onPress={() => StatusBarIOS.setStyle(StatusBarIOS.Style[key], true)}> + onPress={() => StatusBarIOS.setStyle(style, true)}> <View style={styles.button}> - <Text>setStyle(StatusBarIOS.Style.{key}, true)</Text> + <Text>setStyle('{style}', true)</Text> </View> </TouchableHighlight> )} @@ -49,18 +49,18 @@ exports.examples render() { return ( <View> - {Object.keys(StatusBarIOS.Animation).map((key) => + {['none', 'fade', 'slide'].map((animation) => <View> <TouchableHighlight style={styles.wrapper} - onPress={() => StatusBarIOS.setHidden(true, StatusBarIOS.Animation[key])}> + onPress={() => StatusBarIOS.setHidden(true, animation)}> <View style={styles.button}> - <Text>setHidden(true, StatusBarIOS.Animation.{key})</Text> + <Text>setHidden(true, '{animation}')</Text> </View> </TouchableHighlight> <TouchableHighlight style={styles.wrapper} - onPress={() => StatusBarIOS.setHidden(false, StatusBarIOS.Animation[key])}> + onPress={() => StatusBarIOS.setHidden(false, animation)}> <View style={styles.button}> - <Text>setHidden(false, StatusBarIOS.Animation.{key})</Text> + <Text>setHidden(false, '{animation}')</Text> </View> </TouchableHighlight> </View> diff --git a/docs/textinput.html b/docs/textinput.html index edaf51c9af5..db5d05375b2 100644 --- a/docs/textinput.html +++ b/docs/textinput.html @@ -23,7 +23,7 @@ potentially doing very slow operations on every keystroke then you may want to try increasing this.

clearButtonMode enum('never', 'while-editing', 'unless-editing', 'always') #

When the clear button should appear on the right side of the text view

clearTextOnFocus bool #

If true, clears the text field automatically when editing begins

controlled bool #

If you really want this to behave as a controlled component, you can set 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', 'decimal-pad', 'twitter', 'web-search', "numeric", 'email-address') #

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 #

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

onChangeText function #

onEndEditing function #

Callback that is called when text input ends.

onFocus function #

Callback that is called when the text input is focused

onLayout function #

Invoked on mount and layout changes with {x, y, width, height}.

onSubmitEditing function #

Callback that is called when the text input's submit button is pressed.

password bool #

If true, the text input obscures the text entered so that sensitive text +automatically enables it when there is text. Default value is false.

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

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 #

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

onChangeText function #

onEndEditing function #

Callback that is called when text input ends.

onFocus function #

Callback that is called when the text input is focused

onLayout function #

Invoked on mount and layout changes with {x, y, width, height}.

onSubmitEditing function #

Callback that is called when the text input's submit button is pressed.

password bool #

If true, the text input obscures the text entered so that sensitive text like passwords stay secure. 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.

selectTextOnFocus bool #

If true, selected the text automatically when editing begins

selectionState DocumentSelectionState #

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

style Text#style #

Styles

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'; diff --git a/docs/touchablewithoutfeedback.html b/docs/touchablewithoutfeedback.html index 91cd6dfa9ff..668ec54634d 100644 --- a/docs/touchablewithoutfeedback.html +++ b/docs/touchablewithoutfeedback.html @@ -1,7 +1,7 @@ React Native | A framework for building native apps using React

TouchableWithoutFeedback

Do not use unless you have a very good reason. All the elements that respond to press should have a visual feedback when touched. This is -one of the primary reason a "web" app doesn't feel "native".

Edit on GitHubProps #

onLongPress function #

onPress function #

Called when the touch is released, but not if cancelled (e.g. by a scroll -that steals the responder lock).

onPressIn function #

onPressOut function #

© 2015 Facebook Inc.