QuartzCore类库:函数
经常使用的类动画
CALayer 绘图的图层spa
CAAnimation 抽象的动画类,有一些基本的属性,时间函数等orm
CAPropertyAnimation 继承 CAAnimation 仍是抽象类,抽象出一些keyPath之类的属性继承
CABasicAnimation继承自CAPropertyAnimation 顾名思义,基础的动画类,能够实现基础的动画了ci
CAKeyframeAnimation 继承自CAPropertyAnimation 关键针动画animation
CATransition继承自CAAnimation 封装了一些系统的动画,type,subTypeit
CAAnimationGroup继承自CAAnimation 有animations的来组成动画组io
CADisplayLink相似于NSTimer,按帧数来触发,默认系统帧数60/秒,那么能够设置每几帧触发一次,可是当CPU占用率较高的时候帧数打不到60次/秒,那么就会跳帧,有些触发被pass掉form
CAGradientLayer 继承自CALayer,是一个作颜色渐变的Layer
CAShapeLayer继承自CALayer,能够划线,填充的层
CATransaction 对Layer作动画,begin ,commit
CATransform3D CALayer 都有一个CATransform3D类型的transform属性,可对layer坐x,y,z轴的变换,以及opacity,frame等等,配合CATransaction可完成动画
CoreGraphics类库:
CGContext 类,绘图上下文
CGContextRef ctx = UIGraphicsGetCurrentContext();获取当前上下文
CGContextAdd.....建立一个什么,好比,矩形,圆形,曲线,line等等
CGContextSet......设置,好比StrokeColor,FillColor,lineWidth,alpha等等
用线绘制图形的时候要用
CGContextBeginPath(ctx);
CGContextMovetoPoint(point)将起始点移到一个点上
而后CGContextAddLineToPoint(pont1)划线
......
画好后执行CGContextClosePath(ctx);
最后画的时候:
CGContextFillPath(ctx);只是填充
CGContextDrawPath(ctx,kCGPathFillStroke)填充和线都画,后面的emun能够选择也能够跟上面同样的效果
CGAffineTransform是各类2D变化,UIView的transform属性就是这个类型