iOS Core Graphics 和 Core Animation
来源:互联网 发布:第三次农业普查数据 编辑:程序博客网 时间:2024/05/23 02:00
Core Graphics是基于cpu进行渲染 , Core Animation 是基于GPU进行渲染的。
Core Graphics相对效率低,FPS很难到达60 ,容易出现卡顿;
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextClipToRect(context,greenRect);
[[UIColor greenColor]set];
CGContextRestoreGState(context);
CGContextSaveGState(context);
CGContextClipToRect(context,whiteRect);
[[UIColor whiteColor]set];
[line.text drawAtPoint:whitePointWithFont:font];
CGContextRestoreGState(context);
Core Animation 效率高,流畅。
CAKeyframeAnimation * animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.KeyTimes = keyTimes;
animation.values = values;
animation.duration = duration;
animation.calculationMode = kCAAnimationLinear;
animation.fillMode = kCAFillModeForwards;
animation.removedOnCompletion = NO;
[_maskLayer addAnimation:animation forKey:@"MaskAnimation"];
- iOS Core Graphics 和 Core Animation
- IOS Core Animation 和 Graphics 学习
- IOS开发——Core Graphics & Core Animation
- Core Animation Core Graphics UIkit 关系
- iOS -- Core Graphics
- iOS Core Graphics手写板
- iOS Core Graphics介绍
- 第三十九篇:IOS核心高级动画 Core Animation、Core Graphics
- ios Core Animation
- ios Core Animation 动画
- iOS Core Animation
- iOS QuartzCore - Core Animation
- iOS Core Animation
- iOS Core Animation--视觉效果
- iOS Core Animation---变换
- IOS学习 Core-Animation旋转和平移
- iOS Core Animation笔记--UIView和CALayer
- [ios]Core Graphics入门【转】
- 浅析Apache重写规则中RewriteCond规则参数和 RewriteRule 规则参数
- 175 - Combine Two Tables
- UIPasteboard 粘贴板
- (4.5.1.3)Import project(Eclipse ADT, Gradle, etc.)
- java设计模式——行为型之命令模式
- iOS Core Graphics 和 Core Animation
- mysql 的行转列
- Ubuntu中文语言包的安装
- iOS根据2个经纬度计算距离
- sunjce iOS des 3des解密加密
- Javaweb开发错误关于web.xml
- (4.5.1.4)Import Project(Eclipse ADT, Gradle,etc)(包括导入第三方Project项目(不是jar包形式))
- mysql dump备份方式 mysql还原操作练习
- FOJ Problem 1081 等分液体