IOS第18天(9,核心动画-动画组)】的更多相关文章

****动画组 // 核心动画都是假象,不能改变layer的真实属性的值// 展示的位置和实际的位置不同.实际位置永远在最开始位置 #import "HMViewController.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UIView *redView; @end @implementation HMViewController - (void)viewDidLoad { [supe…
****动画效果 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [UIView animateWithDuration: animations:^{ // 旋转 // _imageView.layer.transform = CATransform3DMakeRotation(M_PI, 1, 1, 0); // 平移 // _imageView.layer.transform = CATransform3D…
*****HMViewController.m #import "HMViewController.h" #import "HMWheelView.h" @interface HMViewController () @property (nonatomic, weak) HMWheelView *wheelView; @end @implementation HMViewController - (IBAction)start:(id)sender { [_whee…
***翻页效果 #import "HMViewController.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UIImageView *imageView; @property (nonatomic, assign) int index; @end @implementation HMViewController - (void)viewDidLoad { [super viewDidL…
**** #import "HMViewController.h" // 每秒秒针转6度 #define perSecendA 6 // 每分钟分针转6度 #define perMinuteA 6 // 每小时时针转6度 #define perHourA 30 // 每分钟时针转6度 #define perMinuteHourA 0.5 #define angle2radian(x) ((x) / 180.0 * M_PI) @interface HMViewController ()…
******* #import "HMViewController.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UIView *redView; @end @implementation HMViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading t…
******* #import "HMViewController.h" @interface HMViewController () @property (nonatomic, weak) CALayer *layer; @end @implementation HMViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, t…
转自:http://www.cnblogs.com/wendingding/p/3801454.html iOS开发UI篇—核心动画(转场动画和组动画) 一.转场动画简单介绍 CAAnimation的子类,用于做转场动画,能够为层提供移出屏幕和移入屏幕的动画效果.iOS比Mac OS X的转场动画效果少一点 UINavigationController就是通过CATransition实现了将控制器的视图推入屏幕的动画效果 属性解析: type:动画过渡类型 subtype:动画过渡方向 star…
前言:我的第一篇文章荼菜的iOS笔记–Core Animation 核心动画算是比较详细讲了核心动画的用法,但是如你上篇看到的,有时我们只是想实现一些很小的动画,这时再用coreAnimation就会觉得麻烦,不用慌,苹果工程师爸爸们已经为我们给UIView封装好了一些coreAnimationBlock,足以满足平时的动画需求. 动画Block1 1 2 3 4 5 6 7 8 9 10 /* 参数1: Duration: 动画持续时间 参数2: delay: 延迟时间 参数3: option…
李洪强iOS经典面试题143-绘图与动画   绘图与动画 CAAnimation的层级结构 CAPropertyAnimation是CAAnimation的子类,也是个抽象类,要想创建动画对象,应该使用它的两个子类:CABasicAnimation和CAKeyframeAnimation 属性解析:keyPath:通过指定CALayer的一个属性名称为keyPath(NSString类型),并且对CALayer的这个属性的值进行修改,达到相应的动画效果.比如,指定@"position"…