摘要: 任何对于CALayer属性的修改,都是隐式事务,都会有动画效果.这样的事务会在run-loop中被提交. 1 - (void)viewDidLoad { 2 //初始化一个layer,添加到主视图 3 layer=[CALayer layer]; 4 layer.bounds = CGRectMake(0, 0, 200, 200); 5 layer.position = CGPointMake(160, 250); 6 layer.backgroundColor = [UIColor redColor].CGColor; 7 layer.bor... 阅读全文
posted @ 2013-02-07 16:16 diablo大王 阅读(5621) 评论(0) 推荐(0) 编辑
摘要: 1 CATransition *animation = [CATransitionanimation]; 2 animation.delegate = self; 3 animation.duration = 0.7; 4 animation.timingFunction = UIViewAnimationCurveEaseInOut; 5 6 switch (tag) { 7 case 101: 8 animation.type = kCATransitionFade; // 淡化 9 ... 阅读全文
posted @ 2013-02-07 14:41 diablo大王 阅读(586) 评论(0) 推荐(0) 编辑