动画的使用
来源:互联网 发布:淘宝企业店铺收费 编辑:程序博客网 时间:2024/06/06 07:20
1.使用UIView类函数实现:
[UIView beginAnimations:@"animationID" context:nil];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
//UIViewAnimationTransitionFlipFromLeft,
//UIViewAnimationTransitionFlipFromRight,
//UIViewAnimationTransitionCurlUp,
//UIViewAnimationTransitionCurlDown,
//要执行的动作.
[UIView commitAnimations];
2.使用CATransition对象来实现: //公开的API
CATransition *animation = [CATransition animation];
animation.duration = 0.5f;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.fillMode = kCAFillModeForwards;
animation.type = kCATransitionPush;//kCATransitionMoveIn kCATransitionReveal kCATransitionFade
animation.subtype = kCATransitionFromLeft;//kCATransitionFromRight kCATransitionFromTop kCATransitionFromBottom
[self.view.layer addAnimation:animation forKey:@"animation"];
3.2.使用CATransition对象来实现: //末公开的API
CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = 0.5f;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.fillMode = kCAFillModeForwards;
animation.endProgress =1.0;
animation.removedOnCompletion = NO;
animation.type = @"cube";
//@"suckEffect";@"oglFlip";@"rippleEffect";@"pageCurl";@"pageUnCurl";@"cameraIrisHollowOpen";@"cameraIrisHollowClose";
[self.view.layer addAnimation:animation forKey:@"animation"];
- 动画的使用
- Android动画的使用
- 动画的使用
- 属性动画的使用
- 基础动画的使用
- Spine动画的使用
- 基本动画的使用
- 基础动画的使用
- CATransition动画的使用
- CABasicAnimation动画的使用
- CAAnimationGroup动画的使用
- CAKeyframeAnimation动画的使用
- 动画使用的记录
- 属性动画的使用
- 动画的简单使用
- 安卓中补间动画的使用
- 使用动画的注意事项
- Android动画的使用
- vs2005后注意unicode编码
- 包裝ffmpeg中的codecs成為DirectShow中的transform filter
- NVIDIA联合ARM推PC及服务器芯片
- Todd Veldhuizen:Template Metaprograms
- 对sqlite数据库的增,删,改,查的一般性操作代码
- 动画的使用
- FW:Use the OnReadyStateChange Property in Visual Basic and Visual C/C++
- 图像处理小结
- How to Call Back In Com ?
- Linux设备驱动程序第三版学习(5)- 高级字符驱动程序操作 - ioctl
- release 时去掉nslog的方法
- 英特尔首席执行官:不介意Windows8支持ARM架构
- How Does Excel’s RTD Function Work ?
- 常用小问题