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.

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

snapBackAnimation

The POPSpringAnimation used to animate the movable view to a resting place.

@property (nonatomic, strong) POPSpringAnimation *snapBackAnimation

Declared In

TKMoveScreenEdgeGestureRecognizer.h

velocityDamping

Reduces the velocity used to determine the resting location after a gesture.

@property (nonatomic, assign) CGFloat velocityDamping

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.

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 a CGPoint. Otherwise, it should an array of NSNumbers.

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 a CGPoint. Otherwise, it should an array of NSNumbers.

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.

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 a CGPoint. Otherwise, it should an array of NSNumbers.

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 a CGPoint. Otherwise, it should an array of NSNumbers.

block

A callback block for the gesture-recognizer.

Return Value

A newly minted move-gesture-recognizer.

Declared In

TKMoveScreenEdgeGestureRecognizer.h

moveToPoint:

Animates the movable view to a certain point.

- (void)moveToPoint:(CGPoint)point

Parameters

point

The point the movable view will relocate to.

Declared In

TKMoveScreenEdgeGestureRecognizer.h