CATransition Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/QuartzCore.framework |
| Availability | Available in iOS 2.0 and later. |
| Declared in | CAAnimation.h |
| Companion guides |
Overview
The CATransition class implements transition animations for a layer. You can specify the transition effect from a set of predefined transitions or by providing a custom CIFilter instance.
Tasks
Transition Start and End Point
-
startProgressproperty -
endProgressproperty
Transition Properties
Custom Transition Filter
-
filterproperty
Properties
endProgress
Indicates the end point of the receiver as a fraction of the entire transition.
Discussion
The value must be greater than or equal to startProgress, and not greater than 1.0. If endProgress is less than startProgress the behavior is undefined. The default value is 1.0.
Availability
- Available in iOS 2.0 and later.
Declared In
CAAnimation.hfilter
An optional Core Image filter object that provides the transition.
Discussion
If specified, the filter must support both kCIInputImageKey and kCIInputTargetImageKey input keys, and the kCIOutputImageKey output key. The filter may optionally support the kCIInputExtentKey input key, which is set to a rectangle describing the region in which the transition should run. If filter does not support the required input and output keys the behavior is undefined.
Defaults to nil. When a transition filter is specified the type and subtype properties are ignored.
Special Considerations
Core Image is available only in iOS 5 and later. In earlier versions of iOS, the filters you would assign to this property are unavailable and therefore cannot be used to create transitions.
Availability
- Available in iOS 2.0 and later.
Declared In
CAAnimation.hstartProgress
Indicates the start point of the receiver as a fraction of the entire transition.
Discussion
Legal values are numbers between 0.0 and 1.0. For example, to start the transition half way through its progress set startProgress to 0.5. The default value is 0.
Availability
- Available in iOS 2.0 and later.
Declared In
CAAnimation.hsubtype
Specifies an optional subtype that indicates the direction for the predefined motion-based transitions.
Discussion
The possible values are shown in “Common Transition Subtypes”. The default is nil.
This property is ignored if a custom transition is specified in the filter property.
Availability
- Available in iOS 2.0 and later.
Declared In
CAAnimation.htype
Specifies the predefined transition type.
Discussion
The possible values are shown in “Common Transition Types”. This property is ignored if a custom transition is specified in the filter property. The default is kCATransitionFade.
Availability
- Available in iOS 2.0 and later.
Declared In
CAAnimation.hConstants
Common Transition Types
These constants specify the transition types that can be used with the type property.
NSString * const kCATransitionFade; NSString * const kCATransitionMoveIn; NSString * const kCATransitionPush; NSString * const kCATransitionReveal;
Constants
kCATransitionFadeThe layer’s content fades as it becomes visible or hidden.
Available in iOS 2.0 and later.
Declared in
CAAnimation.h.kCATransitionMoveInThe layer’s content slides into place over any existing content. The
“Common Transition Subtypes”are used with this transition.Available in iOS 2.0 and later.
Declared in
CAAnimation.h.kCATransitionPushThe layer’s content pushes any existing content as it slides into place. The
“Common Transition Subtypes”are used with this transition.Available in iOS 2.0 and later.
Declared in
CAAnimation.h.kCATransitionRevealThe layer’s content is revealed gradually in the direction specified by the transition subtype. The
“Common Transition Subtypes”are used with this transition.Available in iOS 2.0 and later.
Declared in
CAAnimation.h.
Declared In
CATransition.hCommon Transition Subtypes
These constants specify the direction of motion-based transitions. They are used with the subtype property.
NSString * const kCATransitionFromRight; NSString * const kCATransitionFromLeft; NSString * const kCATransitionFromTop; NSString * const kCATransitionFromBottom;
Constants
kCATransitionFromRightThe transition begins at the right side of the layer.
Available in iOS 2.0 and later.
Declared in
CAAnimation.h.kCATransitionFromLeftThe transition begins at the left side of the layer.
Available in iOS 2.0 and later.
Declared in
CAAnimation.h.kCATransitionFromTopThe transition begins at the top of the layer.
Available in iOS 2.0 and later.
Declared in
CAAnimation.h.kCATransitionFromBottomThe transition begins at the bottom of the layer.
Available in iOS 2.0 and later.
Declared in
CAAnimation.h.
Declared In
CATransition.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-02-16)