iOS Developer Library — Pre-Release

Developer

QuartzCore Framework Reference Core Animation Function Reference

Options
Deployment Target:

On This Page
Language:

Core Animation Function Reference

Functions

  • Returns the current absolute time, in seconds.

    Declaration

    Swift

    func CACurrentMediaTime() -> CFTimeInterval

    Objective-C

    CFTimeInterval CACurrentMediaTime ( void );

    Return Value

    A CFTimeInterval derived by calling mach_absolute_time() and converting the result to seconds.

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns a Boolean value that indicates whether the transform is the identity transform.

    Declaration

    Swift

    func CATransform3DIsIdentity(_ t: CATransform3D) -> Bool

    Objective-C

    bool CATransform3DIsIdentity ( CATransform3D t );

    Return Value

    YEStrue if t is the identity transform, otherwise NOfalse.

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns a Boolean value that indicates whether the two transforms are exactly equal.

    Declaration

    Swift

    func CATransform3DEqualToTransform(_ a: CATransform3D, _ b: CATransform3D) -> Bool

    Objective-C

    bool CATransform3DEqualToTransform ( CATransform3D a, CATransform3D b );

    Return Value

    YEStrue if a and b are exactly equal, otherwise NOfalse.

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns a transform that translates by '(tx, ty, tz)'. t' = [1 0 0 0; 0 1 0 0; 0 0 1 0; tx ty tz 1].

    Declaration

    Swift

    func CATransform3DMakeTranslation(_ tx: CGFloat, _ ty: CGFloat, _ tz: CGFloat) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DMakeTranslation ( CGFloat tx, CGFloat ty, CGFloat tz );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns a transform that scales by `(sx, sy, sz)': * t' = [sx 0 0 0; 0 sy 0 0; 0 0 sz 0; 0 0 0 1].

    Declaration

    Swift

    func CATransform3DMakeScale(_ sx: CGFloat, _ sy: CGFloat, _ sz: CGFloat) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DMakeScale ( CGFloat sx, CGFloat sy, CGFloat sz );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns a transform that rotates by 'angle' radians about the vector '(x, y, z)'. If the vector has length zero the identity transform is returned.

    Declaration

    Swift

    func CATransform3DMakeRotation(_ angle: CGFloat, _ x: CGFloat, _ y: CGFloat, _ z: CGFloat) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DMakeRotation ( CGFloat angle, CGFloat x, CGFloat y, CGFloat z );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Translate 't' by '(tx, ty, tz)' and return the result: t' = translate(tx, ty, tz) * t.

    Declaration

    Swift

    func CATransform3DTranslate(_ t: CATransform3D, _ tx: CGFloat, _ ty: CGFloat, _ tz: CGFloat) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DTranslate ( CATransform3D t, CGFloat tx, CGFloat ty, CGFloat tz );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Scale 't' by '(sx, sy, sz)' and return the result: t' = scale(sx, sy, sz) * t.

    Declaration

    Swift

    func CATransform3DScale(_ t: CATransform3D, _ sx: CGFloat, _ sy: CGFloat, _ sz: CGFloat) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DScale ( CATransform3D t, CGFloat sx, CGFloat sy, CGFloat sz );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Rotate 't' by 'angle' radians about the vector '(x, y, z)' and return the result. If the vector has zero length the behavior is undefined: t' = rotation(angle, x, y, z) * t.

    Declaration

    Swift

    func CATransform3DRotate(_ t: CATransform3D, _ angle: CGFloat, _ x: CGFloat, _ y: CGFloat, _ z: CGFloat) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DRotate ( CATransform3D t, CGFloat angle, CGFloat x, CGFloat y, CGFloat z );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Concatenate 'b' to 'a' and return the result: t' = a * b.

    Declaration

    Swift

    func CATransform3DConcat(_ a: CATransform3D, _ b: CATransform3D) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DConcat ( CATransform3D a, CATransform3D b );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Invert 't' and return the result. Returns the original matrix if 't' has no inverse.

    Declaration

    Swift

    func CATransform3DInvert(_ t: CATransform3D) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DInvert ( CATransform3D t );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Return a transform with the same effect as affine transform 'm'.

    Declaration

    Swift

    func CATransform3DMakeAffineTransform(_ m: CGAffineTransform) -> CATransform3D

    Objective-C

    CATransform3D CATransform3DMakeAffineTransform ( CGAffineTransform m );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns true if 't' can be exactly represented by an affine transform.

    Declaration

    Swift

    func CATransform3DIsAffine(_ t: CATransform3D) -> Bool

    Objective-C

    bool CATransform3DIsAffine ( CATransform3D t );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.

  • Returns the affine transform represented by 't'. If 't' can not be exactly represented as an affine transform the returned value is undefined.

    Declaration

    Swift

    func CATransform3DGetAffineTransform(_ t: CATransform3D) -> CGAffineTransform

    Objective-C

    CGAffineTransform CATransform3DGetAffineTransform ( CATransform3D t );

    Import Statement

    Swift

    import QuartzCore

    Availability

    Available in iOS 2.0 and later.