UIView的layout方法

public struct CATransform3D {


    public var m11: CGFloat

    public var m12: CGFloat

    public var m13: CGFloat

    public var m14: CGFloat

    public var m21: CGFloat

    public var m22: CGFloat

    public var m23: CGFloat

    public var m24: CGFloat

    public var m31: CGFloat

    public var m32: CGFloat

    public var m33: CGFloat

    public var m34: CGFloat

    public var m41: CGFloat

    public var m42: CGFloat

    public var m43: CGFloat

    public var m44: CGFloat

    public init()

    public init(m11: CGFloat, m12: CGFloat, m13: CGFloat, m14: CGFloat, m21: CGFloat, m22: CGFloat, m23: CGFloat, m24: CGFloat, m31: CGFloat, m32: CGFloat, m33: CGFloat, m34: CGFloat, m41: CGFloat, m42: CGFloat, m43: CGFloat, m44: CGFloat)
}

这里写图片描述

// 最初的样子
/* The identity transform: [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]. */
public let CATransform3DIdentity: CATransform3D

// 判断一个transform3D的对象是否是最开始的样子
/* Returns true if 't' is the identity transform. */

public func CATransform3DIsIdentity(_ t: CATransform3D) -> Bool

// 比较两个transform3D对象是否等同
/* Returns true if 'a' is exactly equal to 'b'. */
public func CATransform3DEqualToTransform(_ a: CATransform3D, _ b: CATransform3D) -> Bool

//-----平移
//返回一个平移变换的transform3D对象 tx,ty,tz对应x,y,z轴的平移
/* 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]. */

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

//-----缩放
//x,y,z分别对应x轴,y轴,z轴的缩放比例
/* 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]. */


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

//-----旋转
//angle参数是旋转的角度 ,x,y,z决定了旋转围绕的中轴,取值为-1 — 1之间,如(1,0,0),则是绕x轴旋转,(0.5,0.5,0),则是绕x轴与y轴中间45度为轴旋转
/* 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. */

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

//在某个transform3D变换的基础上进行平移变换,t是上一个transform3D
/* Translate 't' by '(tx, ty, tz)' and return the result:
 * t' = translate(tx, ty, tz) * t. */


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


//在一个transform3D变换的基础上进行缩放变换
/* Scale 't' by '(sx, sy, sz)' and return the result:
 * t' = scale(sx, sy, sz) * t. */


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

//在一个transform3D的基础上进行旋转变换
/* 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. */

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

//将一个CGAffineTransform转化为CATransform3D
/* Return a transform with the same effect as affine transform 'm'. */

@available(iOS 2.0, *)
public func CATransform3DMakeAffineTransform(_ m: CGAffineTransform) -> CATransform3D

//判断一个CATransform3D是否可以转换为CGAffineTransform
/* Returns true if 't' can be represented exactly by an affine transform. */

@available(iOS 2.0, *)
public func CATransform3DIsAffine(_ t: CATransform3D) -> Bool


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值