The two methods that ActionSheetIOS makes available are showActionSheetWithOptions and showShareActionSheetWithOptions.
The first method, showActionSheetWithOptions, accepts two arguments: an options object and a callback function.
The options object must contain at least one of the following properties. We use all five in this example:
- options: This is an array of strings that map to the multiple options that appear in the overlay.
- cancelButtonIndex: This is a number that points to the index where the Cancel button, if it exists, is located in the options array. This sends the Cancel button to the very bottom of the overlay.
- destructiveButtonIndex: This is a number that points to the index where a destructive button, ...