Declared in FTUtils+UIGestureRecognizer.h

Overview

This category defines methods and properties which allow the use of blocks for working with UIGestureRecognizer and its subclasses.

For more information on working with gestures in iOS, see Apple’s Event Handling Guide for iOS.

Tasks

Creating a block based Gesture Recognizer

Setting and getting the action handler blocks

  •   actionBlock

    A block to be executed when a UIGestureRecognizer action is fired.

    property

Properties

actionBlock

A block to be executed when a UIGestureRecognizer action is fired.

@property (copy) FTGestureActionBlock actionBlock

Discussion

A block to be executed when a UIGestureRecognizer action is fired.

The block is passed a single parameter which is the UIGestureRecognizer instance for this property.

Declared In

FTUtils+UIGestureRecognizer.h

Class Methods

recognizer

Creates an autoreleased instance of a UIGestureRecognizer subclass with its actionBlock set to nil.

+ (id)recognizer

Return Value

An instance of a UIGestureRecognizer subclass.

Discussion

Creates an autoreleased instance of a UIGestureRecognizer subclass with its actionBlock set to nil.

Important: Until the actionBlock is set, the returned object will do nothing.

Declared In

FTUtils+UIGestureRecognizer.h

recognizerWithActionBlock:

Creates an autoreleased instance of a UIGestureRecognizer subclass which uses action to handle gesture actions.

+ (id)recognizerWithActionBlock:(FTGestureActionBlock)action

Parameters

action

A block which will handle the gesture actions.

Return Value

An instance of a UIGestureRecognizer subclass.

Discussion

Creates an autoreleased instance of a UIGestureRecognizer subclass which uses action to handle gesture actions.

Declared In

FTUtils+UIGestureRecognizer.h