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 optionalonPress
andstyle
keys.style
should be one of 'default', 'cancel' or 'destructive'. - type -- deprecated, do not use
Example:
1 2 3 4 | AlertIOS.alert( 'Sync Complete' , 'All your data are belong to us.' ); |
Please login to continue.