UIGestureRecognizer(FTBlockAdditions) Category Reference
| 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
-
+ recognizerCreates an autoreleased instance of a
UIGestureRecognizersubclass with its actionBlock set tonil. -
+ recognizerWithActionBlock:Creates an autoreleased instance of a
UIGestureRecognizersubclass which uses action to handle gesture actions.
Setting and getting the action handler blocks
-
actionBlockA block to be executed when a
propertyUIGestureRecognizeraction is fired.
Properties
actionBlock
A block to be executed when a UIGestureRecognizer action is fired.
@property (copy) FTGestureActionBlock actionBlockDiscussion
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.hClass Methods
recognizer
Creates an autoreleased instance of a UIGestureRecognizer subclass with
its actionBlock set to nil.
+ (id)recognizerReturn 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.
See Also
Declared In
FTUtils+UIGestureRecognizer.hrecognizerWithActionBlock:
Creates an autoreleased instance of a UIGestureRecognizer subclass which
uses action to handle gesture actions.
+ (id)recognizerWithActionBlock:(FTGestureActionBlock)actionParameters
- 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.
See Also
Declared In
FTUtils+UIGestureRecognizer.h