AlertIOS.alert()

static alert(title, message?, callbackOrButtons?, type?)

Creates a popup to alert the user. See Alert.

  • title: string -- The dialog's title.
  • message: string -- An optional message that appears above the text input.
  • callbackOrButtons -- This optional argument should be either a single-argument function or an array of buttons. If passed a function, it will be called when the user taps 'OK'.

    If passed an array of button configurations, each button should include a text key, as well as optional onPress and style keys. style should be one of 'default', 'cancel' or 'destructive'.

  • type -- deprecated, do not use

Example:

AlertIOS.alert(
 'Sync Complete',
 'All your data are belong to us.'
);
doc_React_Native
2016-06-23 04:23:24
Comments
Leave a Comment

Please login to continue.