基础动画和核心动画导览
2014-07-09 09:59
253 查看
1 uiview动画
[UIView beginAnimations:@"Curl"context:nil];//动画开始
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:view cache:YES];
[view removeFromSuperview];
[UIView commitAnimations];
2 CATransition层动画
CATransition *animation = [CATransition animation]; [animation setDuration:1.25f];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
[animation setType:kCATransitionReveal];
[animation setSubtype: kCATransitionFromBottom];
[self.view.layer addAnimation:animation forKey:@"Reveal"];
这里使用了setType与setSubtype组合,这使用个比较保险,因为他的参数就是官方API里定义的,他们的参数说明可以参考如下:
[animation setType:@"suckEffect"];
这里的suckEffect就是效果名称,可以用的效果主要有:
pageCurl 向上翻一页
pageUnCurl 向下翻一页
rippleEffect 滴水效果
suckEffect 收缩效果,如一块布被抽走
cube 立方体效果
oglFlip 上下翻转效果
3 核心动画
http://blog.csdn.net/dztianyu/article/details/13776043
foldLayer = [CATransformLayer
layer]; foldLayer.anchorPoint
= CGPointMake(1.0f,
0.5f); foldLayer.zPosition
= 0; foldLayer.frame
= CGRectMake(0,
0, width/2,
height); [foldLayer
addSublayer:currentLeftLayer]; [zheyeLayer
addSublayer:foldLayer];
CATransform3D endTransform =
CATransform3DIdentity; endTransform.m34
= 1.0f/2500.f;
endTransform = CATransform3DRotate(endTransform, cosA,
0.0,
1.0,
0.0); foldLayer.transform
= endTransform;
[UIView beginAnimations:@"Curl"context:nil];//动画开始
[UIView setAnimationDuration:0.75];
[UIView setAnimationDelegate:self];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:view cache:YES];
[view removeFromSuperview];
[UIView commitAnimations];
2 CATransition层动画
CATransition *animation = [CATransition animation]; [animation setDuration:1.25f];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
[animation setType:kCATransitionReveal];
[animation setSubtype: kCATransitionFromBottom];
[self.view.layer addAnimation:animation forKey:@"Reveal"];
这里使用了setType与setSubtype组合,这使用个比较保险,因为他的参数就是官方API里定义的,他们的参数说明可以参考如下:
[animation setType:@"suckEffect"];
这里的suckEffect就是效果名称,可以用的效果主要有:
pageCurl 向上翻一页
pageUnCurl 向下翻一页
rippleEffect 滴水效果
suckEffect 收缩效果,如一块布被抽走
cube 立方体效果
oglFlip 上下翻转效果
3 核心动画
http://blog.csdn.net/dztianyu/article/details/13776043
foldLayer = [CATransformLayer
layer]; foldLayer.anchorPoint
= CGPointMake(1.0f,
0.5f); foldLayer.zPosition
= 0; foldLayer.frame
= CGRectMake(0,
0, width/2,
height); [foldLayer
addSublayer:currentLeftLayer]; [zheyeLayer
addSublayer:foldLayer];
CATransform3D endTransform =
CATransform3DIdentity; endTransform.m34
= 1.0f/2500.f;
endTransform = CATransform3DRotate(endTransform, cosA,
0.0,
1.0,
0.0); foldLayer.transform
= endTransform;
相关文章推荐
- 第二部分 核心动画基础---第三章 基础动画
- iOS开发UI篇—核心动画(基础动画)
- 核心动画(基础动画)
- iOS 核心动画 -基础动画
- 核心动画基础动画(CABasicAnimation)关键帧动画
- 第二部分 核心动画基础---第三章 基础动画
- iOS_Core Animation核心动画 基础动画的学习与总结
- 核心动画——基础动画
- 动画和核心动画为基础的导航
- iOS开发UI篇—核心动画(基础动画)
- iOS开发UI篇—核心动画(基础动画)
- Core Animation 官方文档第一章(基础核心动画)
- iOS开发UI篇—核心动画(基础动画)
- CoreAnimation-04-核心动画必备基础
- iOS开发基础知识:Core Animation(核心动画)
- iOS基础 - 核心动画
- 猫猫学IOS(三十九)UI之核心动画之CABasicAnimation(基础动画)
- iOS开发UI高级—33核心动画(基础动画)
- iOS 核心动画-基础动画
- iOS开发基础知识:Core Animation(核心动画)