摘要:
1 #import "NJViewController.h" 2 3 @interface NJViewController () 4 @property (weak, nonatomic) IBOutlet UIView *cutomView; 5 6 @end 7 8 @implemen... 阅读全文
摘要:
1 // 平移动画 2 CABasicAnimation *a1 = [CABasicAnimation animation]; 3 a1.keyPath = @"transform.translation.y"; 4 a1.toValue = @(100); 5 ... 阅读全文
摘要:
1 #import "NJViewController.h" 2 3 @interface NJViewController () 4 @property (weak, nonatomic) IBOutlet UIImageView *iconView; 5 - (IBAction)nextBt... 阅读全文
摘要:
1 #import "NJViewController.h" 2 3 #define angle2Radian(angle) ((angle) / 180.0 * M_PI) 4 5 @interface NJViewController () 6 7 @property (weak, no... 阅读全文
摘要:
1 #import "NJViewController.h" 2 3 @interface NJViewController () 4 5 @property (weak, nonatomic) IBOutlet UIView *customView; 6 - (IBAction)btnCli... 阅读全文
摘要:
Core Animation,中文翻译为核心动画,它是一组非常强大的动画处理api,使用它能做出非常绚丽的动画效果,而且往往事半功倍。也就是说食用少量的代码就能实现非常强大的功能。Core Animation可以用在Mac OS X和IOS平台Core Animation的动画执行过程都是在后台操作... 阅读全文
摘要:
两种方式 1 #import 2 3 @interface NJLayer : CALayer 4 @end 5 6 7 #import "NJLayer.h" 8 9 @implementation NJLayer10 11 // 重写该方法, 在该方法中给layer上绘制图形12 //... 阅读全文
摘要:
1. 每一个UIView内部都默认关联着一个CALayer,我们可以称这个Layer为Root Layer2. 所有的非Root Layer,也就是手动创建的CALayer对象都存在着隐式动画什么是隐式动画 1 当对非Root Layer的部分属性进行修改时,默认会自动产生一些动画效果 2 而这... 阅读全文
摘要:
1 // 如果一个控制是另外一个控件的子控件, 那么这个控件中的layer也是另外一个控件的子layer2 NSLog(@"star - %@", self.view.layer.sublayers);3 CALayer *layer = [CALayer layer];4... 阅读全文