Inherits from UIActionSheet
Declared in DTActionSheet.h

Overview

Extends UIActionSheet with support for blocks.

Properties

actionSheetDelegate

Use the actionSheetDelegate when you want to to receive UIActionSheetDelegate messages.

@property (nonatomic, DT_WEAK_PROPERTY) id<UIActionSheetDelegate> actionSheetDelegate

Declared In

DTActionSheet.h

Instance Methods

addButtonWithTitle:block:

Adds a custom button to the action sheet.

- (NSInteger)addButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block

Parameters

title

The title of the new button.

block

The block to execute when the button is tapped.

Return Value

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

Declared In

DTActionSheet.h

addCancelButtonWithTitle:

Adds a custom cancel button to the action sheet.

- (NSInteger)addCancelButtonWithTitle:(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.

Discussion

Since there can only be one cancel button a previously marked cancel button becomes a normal button.

Declared In

DTActionSheet.h

addCancelButtonWithTitle:block:

Adds a custom cancel button to the action sheet.

- (NSInteger)addCancelButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block

Parameters

title

The title of the new button.

block

The block to execute when the button is tapped.

Return Value

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

Discussion

Since there can only be one cancel button a previously marked cancel button becomes a normal button.

Declared In

DTActionSheet.h

addDestructiveButtonWithTitle:block:

Adds a custom destructive button to the action sheet.

- (NSInteger)addDestructiveButtonWithTitle:(NSString *)title block:(DTActionSheetBlock)block

Parameters

title

The title of the new button.

block

The block to execute when the button is tapped.

Return Value

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

Discussion

Since there can only be one destructive button a previously marked destructive button becomes a normal button.

Declared In

DTActionSheet.h

initWithTitle:

Initializes the action sheet using the specified title.

- (instancetype)initWithTitle:(NSString *)title

Parameters

title

The title

Declared In

DTActionSheet.h