Declared in UIControl+BlocksKit.h

Overview

Block control event handling for UIControl.

Includes code by the following:

Warning: UIControl is only available on a platform with UIKit.

Tasks

Block event handling

Instance Methods

bk_addEventHandler:forControlEvents:

- (void)bk_addEventHandler:(void ( ^ ) ( id sender ))handler forControlEvents:(UIControlEvents)controlEvents
Discussion

Adds a block for a particular event to an internal dispatch table.

Parameters

handler

A block representing an action message, with an argument for the sender.

controlEvents

A bitmask specifying the control events for which the action message is sent.

Declared In

UIControl+BlocksKit.h

bk_hasEventHandlersForControlEvents:

- (BOOL)bk_hasEventHandlersForControlEvents:(UIControlEvents)controlEvents
Discussion

Checks to see if the control has any blocks for a particular event combination.

Parameters

controlEvents

A bitmask specifying the control events for which to check for blocks.

Return Value

Returns YES if there are blocks for these control events, NO otherwise.

Declared In

UIControl+BlocksKit.h

bk_removeEventHandlersForControlEvents:

- (void)bk_removeEventHandlersForControlEvents:(UIControlEvents)controlEvents
Discussion

Removes all blocks for a particular event combination.

Parameters

controlEvents

A bitmask specifying the control events for which the block will be removed.

Declared In

UIControl+BlocksKit.h