Inherits from UIActionSheet
Declared in KVActionSheet.h
KVActionSheet.m

Overview

This subclass of UIActionSheet adds support for blocks.

Tasks

Creating action sheet

Customizing action sheet

Class Methods

actionSheetWithTitle:destructiveButtonTitle:destructiveBlock:cancelButtonTitle:cancelBlock:

Create an action sheet

+ (KVActionSheet *)actionSheetWithTitle:(NSString *)title destructiveButtonTitle:(NSString *)destructiveButtonTitle destructiveBlock:(KVActionSheetBlock)destructiveBlock cancelButtonTitle:(NSString *)cancelButtonTitle cancelBlock:(KVActionSheetBlock)cancelBlock

Parameters

title

Title in action sheet

destructiveButtonTitle

Title of the destructive (red) button in action sheet

destructiveBlock

Block to execute when the destructive button is pressed

cancelButtonTitle

Title of Cancel button in action sheet

cancelBlock

Block to execute when Cancel button is pressed

Return Value

Instance of KVActionSheet

Discussion

Create an action sheet

Declared In

KVActionSheet.h

Instance Methods

addButtonWithTitle:block:

Add a button to the action sheet

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

Parameters

title

Title of button

block

Block to execute when button is pressed

Return Value

Index of added button

Discussion

Add a button to the action sheet

Declared In

KVActionSheet.h