【发布时间】:2011-04-09 11:25:34
【问题描述】:
如何在 iOS 中使用CAAnimation 子类实现kCATransitionPush?
CAAnimation *animation;
// How do you create an animation that does the same than:
// CATransition *animation = [CATransition animation];
// [animation setType:kCATransitionPush];
[self.view.layer addAnimation:animation forKey:nil];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[self.view addSubview:change];
[UIView commitAnimations];
我知道UIView 动画可以使用also,但如果我可以从头开始实现kCATransitionPush 过渡,这将有助于我更好地理解核心动画 .
【问题讨论】:
标签: iphone ios core-animation caanimation catransition