Inherits from NSObject
Conforms to PMTweenTempoDelegate
PMTweening
Declared in PMTweenSequence.h
PMTweenSequence.m

Overview

PMTweenSequence allows objects which conform to the PMTweening protocol to be chained together in a sequential series of tween steps.

Properties

completeBlock

This notification block is executed when a tween operation has completed (or when all tween cycles have completed, if repeating is set to YES).

@property (nonatomic, copy) PMTweenDidCompleteBlock completeBlock

Declared In

PMTweenSequence.h

cyclesCompletedCount

The number of completed tween cycles. (read-only)

@property (readonly, nonatomic, assign) NSUInteger cyclesCompletedCount

Discussion

@remarks A cycle represents the total length of tweening operation.

Declared In

PMTweenSequence.h

delay

The delay, in seconds, before a sequence begins.

@property (nonatomic, assign) NSTimeInterval delay

Discussion

Warning: Setting this parameter after a sequence has begun has no effect.

Declared In

PMTweenSequence.h

numberOfRepeats

The number of tween cycle operations to repeat.

@property (nonatomic, assign) NSUInteger numberOfRepeats

Discussion

@remarks This property is only used when the sequence’s repeating property is set to YES. Negative values are clamped to 0. The default value is 0.

Declared In

PMTweenSequence.h

pauseBlock

This notification block is executed when calling the pauseTween method on this instance causes a tween operation to pause.

@property (nonatomic, copy) PMTweenDidPauseBlock pauseBlock

See Also

Declared In

PMTweenSequence.h

repeatCycleBlock

This notification block is executed when a tween cycle has completed.

@property (nonatomic, copy) PMTweenDidRepeatBlock repeatCycleBlock

Declared In

PMTweenSequence.h

repeating

A Boolean which determines whether a tween operation should repeat.

@property (nonatomic, assign) BOOL repeating

Discussion

@remarks When set to YES, the tween operation repeats for the number of times specified by the numberOfRepeats property. The default value is NO.

Declared In

PMTweenSequence.h

resumeBlock

This notification block is executed when calling the resumeTween method on this instance causes a tween operation to resume.

@property (nonatomic, copy) PMTweenDidResumeBlock resumeBlock

See Also

Declared In

PMTweenSequence.h

reverseBlock

This notification block is executed when this instance’s tweenDirection property changes to PMTweenDirectionReverse.

@property (nonatomic, copy) PMTweenDidReverseBlock reverseBlock

See Also

Declared In

PMTweenSequence.h

reversingMode

The mode which defines a sequence’s behavior when its reversing property is set to YES.

@property (nonatomic, assign) PMTweenSequenceReversingMode reversingMode

Discussion

@remarks The default value is PMTweenSequenceReversingNoncontiguous.

Declared In

PMTweenSequence.h

sequenceSteps

An array comprising tween objects which are controlled by this PMTweenSequence object. (read-only)

@property (readonly, nonatomic, strong) NSArray *sequenceSteps

Discussion

@remarks The order of objects in this array represents the sequence order in which each will be tweened.

Declared In

PMTweenSequence.h

startBlock

This notification block is executed when calling the startTween method on this instance causes a tween operation to start.

@property (nonatomic, copy) PMTweenDidStartBlock startBlock

See Also

Declared In

PMTweenSequence.h

stopBlock

This notification block is executed when calling the stopTween method on this instance causes a tween operation to stop.

@property (nonatomic, copy) PMTweenDidStopBlock stopBlock

See Also

Declared In

PMTweenSequence.h

tweenDirection

A PMTweenDirection enum which represents the current direction of the tween operation. (read-only)

@property (readonly, nonatomic, assign) PMTweenDirection tweenDirection

Declared In

PMTweenSequence.h

tweenState

A PMTweenState enum which represents the current state of the tween operation. (read-only)

@property (readonly, nonatomic, assign) PMTweenState tweenState

Declared In

PMTweenSequence.h

updateBlock

This notification block is executed when the updateWithTimeInterval:currentTime: method is called on this instance while this instance’s tweenState is PMTweenStateTweening.

@property (nonatomic, copy) PMTweenDidUpdateBlock updateBlock

Declared In

PMTweenSequence.h

Instance Methods

addSequenceStep:useTweenTempo:

Adds a sequence step to the end of the sequence.

- (void)addSequenceStep:(NSObject<PMTweening> *)sequenceStep useTweenTempo:(BOOL)useTweenTempo

Parameters

sequenceStep

An object which conforms to the PMTweening protocol.

useTweenTempo

When YES, the tween object should use its own tempo to update its tween progress, and thus the updateWithTimeInterval:currentTime: method will not be called on the object by the PMTweenSequence instance.

Discussion

Warning: A NSInternalInconsistencyException will be raised if the provided object does not adopt the PMTweening protocol.

Declared In

PMTweenSequence.h

currentSequenceStep

The sequence step which is currently tweening, or the first sequence step if this instance’s tweenState is PMTweenStateStopped.

- (NSObject<PMTweening> *)currentSequenceStep

Return Value

The current tween object.

Declared In

PMTweenSequence.h

initWithSequenceSteps:options:

Initializes a new PMTweenSequence object, and uses the provided array of tween objects as its sequence steps.

- (instancetype)initWithSequenceSteps:(NSArray *)sequenceSteps options:(PMTweenOptions)options

Parameters

sequenceSteps

An array of objects which should conform to the PMTweening protocol.

options

A bitmask of PMTweenOptions configuration values.

Return Value

A new instance of this class.

@remarks The sequence in which the objects are tweened is defined by their order in the provided array.

Discussion

Warning: A NSInternalInconsistencyException will be raised if the provided array contains an object which does not adopt the PMTweening protocol.

Declared In

PMTweenSequence.h

isReversing

A Boolean which determines whether a tween operation, when it has tweened to the ending value, should tween from the ending value back to the starting value.

- (BOOL)isReversing

Discussion

@remarks When set to YES, the tween plays in reverse after completing a forward tween. In this state, a tween cycle represents the combination of the forward and back tweens. The default value is NO.

Declared In

PMTweening.h

pauseTween

Pauses a tween that is currently tweening. (required)

- (void)pauseTween

Discussion

@remarks When this method is called, a tween should only enter a paused state if it is currently tweening.

Declared In

PMTweening.h

removeSequenceStep:

Removes the specified object from the sequence.

- (void)removeSequenceStep:(NSObject<PMTweening> *)sequenceStep

Parameters

sequenceStep

The sequence step to remove.

Declared In

PMTweenSequence.h

resumeTween

Resumes a tween that is currently paused. (required)

- (void)resumeTween

Discussion

@remarks When this method is called, a tween should only resume tweening if it is currently paused.

Declared In

PMTweening.h

setReversing:

A Boolean which determines whether a tween operation, when it has tweened to the ending value, should tween from the ending value back to the starting value.

- (void)setReversing:(BOOL)reversing

Discussion

@remarks When set to YES, the tween plays in reverse after completing a forward tween. In this state, a tween cycle represents the combination of the forward and back tweens. The default value is NO.

Declared In

PMTweening.h

setTempo:

A concrete PMTweenTempo subclass that provides an update “beat” while a tween operation occurs.

- (void)setTempo:(PMTweenTempo *)tempo

Discussion

@remarks While you don’t have to implement PMTweenTempo for your own class updating, other tween collection classes like PMTweenGroup will try to remove any tempos of tween objects added to them.

Declared In

PMTweening.h

startTween

Starts a tween that is currently stopped. (required)

- (void)startTween

Discussion

@remarks When this method is called, a tween should only start tweening if it is stopped.

Declared In

PMTweening.h

stopTween

Stops a tween that is currently tweening. (required)

- (void)stopTween

Discussion

@remarks When this method is called, a tween should only enter a stopped state if it currently tweening.

Declared In

PMTweening.h

tempo

A concrete PMTweenTempo subclass that provides an update “beat” while a tween operation occurs.

- (PMTweenTempo *)tempo

Discussion

@remarks While you don’t have to implement PMTweenTempo for your own class updating, other tween collection classes like PMTweenGroup will try to remove any tempos of tween objects added to them.

Declared In

PMTweening.h

tempoBeatWithTimestamp:

Sends an update beat that should prompt tweening classes to recalculate tween values.

- (void)tempoBeatWithTimestamp:(NSTimeInterval)timestamp

Parameters

timestamp

A timestamp with the current time, by which tween classes can calculate new tween values.

Declared In

PMTweenTempo.h

updateWithTimeInterval:

This method is called to prompt a tweening class to update its current tween values.

- (void)updateWithTimeInterval:(NSTimeInterval)currentTime

Parameters

currentTime

A timestamp that can be used in easing calculations.

Declared In

PMTweening.h