TKMoveScreenEdgeGestureRecognizer Class Reference
Inherits from | UIScreenEdgePanGestureRecognizer |
Declared in | TKMoveScreenEdgeGestureRecognizer.h TKMoveScreenEdgeGestureRecognizer.m |
Overview
TKMoveScreenEdgeGestureRecognizer
is a screen-edge-pan-gesture-recognizer built to move a view between certain locations.
Tasks
-
+ gestureWithAxis:movableView:
-
+ gestureWithAxis:movableView:locations:
-
+ gestureWithAxis:movableView:locations:moveHandler:
-
– initWithAxis:movableView:
-
– initWithAxis:movableView:locations:
-
– initWithAxis:movableView:locations:moveHandler:
-
moveHandler
property -
axis
property -
moving
property -
animating
property -
canMoveOutsideLocationBounds
property -
movableView
property -
locations
property -
snapBackAnimation
property -
velocityDamping
property -
– moveToPoint:
Properties
animating
A flag that indicates if the movable view is moving to a resting location.
@property (nonatomic, readonly) BOOL animating
Declared In
TKMoveScreenEdgeGestureRecognizer.h
axis
The directions the movable can go.
@property (nonatomic, readonly) TKMoveGestureAxis axis
Declared In
TKMoveScreenEdgeGestureRecognizer.h
canMoveOutsideLocationBounds
If YES, it keeps the view within the location bounds. Otherwise NO.
@property (nonatomic, assign) BOOL canMoveOutsideLocationBounds
Declared In
TKMoveScreenEdgeGestureRecognizer.h
locations
Resting locations for the movable view.
@property (nonatomic, strong) NSArray *locations
Declared In
TKMoveScreenEdgeGestureRecognizer.h
movableView
The view that the gesture will move.
@property (nonatomic, strong) UIView *movableView
Declared In
TKMoveScreenEdgeGestureRecognizer.h
moveHandler
The callback of the gesture-recognizer.
@property (nonatomic, copy, setter=setMoveHandler, :) void ( ^ ) ( TKMoveScreenEdgeGestureRecognizer *gesture , CGPoint position , CGPoint location ) moveHandler
Declared In
TKMoveScreenEdgeGestureRecognizer.h
moving
A flag that indicates if the gesture is active.
@property (nonatomic, readonly) BOOL moving
Declared In
TKMoveScreenEdgeGestureRecognizer.h
Class Methods
gestureWithAxis:movableView:
Creates and returns a gesture recognizer to move a view between points.
+ (instancetype)gestureWithAxis:(TKMoveGestureAxis)axis movableView:(UIView *)movableView
Parameters
- axis
The directions the movable can move in.
- movableView
The view that the gesture will move.
Return Value
A newly minted move-gesture-recognizer.
Declared In
TKMoveScreenEdgeGestureRecognizer.h
gestureWithAxis:movableView:locations:
Creates and returns a gesture recognizer to move a view between points.
+ (instancetype)gestureWithAxis:(TKMoveGestureAxis)axis movableView:(UIView *)movableView locations:(NSArray *)locations
Parameters
- axis
The directions the movable can move in.
- movableView
The view that the gesture will move.
Return Value
A newly minted move-gesture-recognizer.
Declared In
TKMoveScreenEdgeGestureRecognizer.h
gestureWithAxis:movableView:locations:moveHandler:
Creates and returns a gesture recognizer to move a view between points.
+ (instancetype)gestureWithAxis:(TKMoveGestureAxis)axis movableView:(UIView *)movableView locations:(NSArray *)locations moveHandler:(void ( ^ ) ( TKMoveScreenEdgeGestureRecognizer *gesture , CGPoint position , CGPoint location ))block
Parameters
- axis
The directions the movable can move in.
- movableView
The view that the gesture will move.
- locations
An array of locations that the view can move to. If the axis is X&Y, then the array should contain
NSValue
objects with aCGPoint
. Otherwise, it should an array ofNSNumbers
.
- block
A callback block for the gesture-recognizer.
Return Value
A newly minted move-gesture-recognizer.
Declared In
TKMoveScreenEdgeGestureRecognizer.h
Instance Methods
initWithAxis:movableView:
Creates and returns a gesture recognizer to move a view between points.
- (instancetype)initWithAxis:(TKMoveGestureAxis)axis movableView:(UIView *)movableView
Parameters
- axis
The directions the movable can move in.
- movableView
The view that the gesture will move.
Return Value
A newly minted move-gesture-recognizer.
Declared In
TKMoveScreenEdgeGestureRecognizer.h
initWithAxis:movableView:locations:
Creates and returns a gesture recognizer to move a view between points.
- (instancetype)initWithAxis:(TKMoveGestureAxis)axis movableView:(UIView *)movableView locations:(NSArray *)locations
Parameters
- axis
The directions the movable can move in.
- movableView
The view that the gesture will move.
Return Value
A newly minted move-gesture-recognizer.
Declared In
TKMoveScreenEdgeGestureRecognizer.h
initWithAxis:movableView:locations:moveHandler:
Creates and returns a gesture recognizer to move a view between points.
- (instancetype)initWithAxis:(TKMoveGestureAxis)axis movableView:(UIView *)movableView locations:(NSArray *)locations moveHandler:(void ( ^ ) ( TKMoveScreenEdgeGestureRecognizer *gesture , CGPoint position , CGPoint location ))block
Parameters
- axis
The directions the movable can move in.
- movableView
The view that the gesture will move.
- locations
An array of locations that the view can move to. If the axis is X&Y, then the array should contain
NSValue
objects with aCGPoint
. Otherwise, it should an array ofNSNumbers
.
- block
A callback block for the gesture-recognizer.
Return Value
A newly minted move-gesture-recognizer.
Declared In
TKMoveScreenEdgeGestureRecognizer.h