Instance Method

addButtonWithTitle:

Adds a custom button to the action sheet.

Declaration

- (NSInteger)addButtonWithTitle:(NSString *)title;

Parameters

title

The title of the new button.

Return Value

The index of the new button. Button indices start at 0 and increase in the order they are added.

See Also

Configuring Buttons

numberOfButtons

The number of buttons on the action sheet.

Deprecated
- buttonTitleAtIndex:

Returns the title of the button at the specified index.

Deprecated
cancelButtonIndex

The index number of the cancel button.

Deprecated
destructiveButtonIndex

The index number of the destructive button.

Deprecated
firstOtherButtonIndex

The index of the first custom button.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software