IOS动画中的枚举UIViewAnimationOptions
来源:互联网 发布:mac 查找软件安装路径 编辑:程序博客网 时间:2024/06/04 20:10
首先这个枚举属于UIViewAnimation。我们经常使用的函数是
- (1)、+ (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations NS_AVAILABLE_IOS(4_0);
- (2)、+ (void)animateWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion NS_AVAILABLE_IOS(4_0);
如果动画稍微复杂点,例如需要组合等等就可能用到这个函数:
- (1)、+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion NS_AVAILABLE_IOS(4_0);
以上方法中的options一项需要传入一个枚举,这个枚举大概控制的是这几个要素:当前动画嵌套中的动画执行随时间的快慢种类(先快后慢等..)。动画要一直重复吗。如果我使用转场动画那么我用哪种转场效果。还有子动画嵌套在父动画中时我们如何对待父动画中的相同选项等等..
正文:UIViewAnimationOptions
- UIViewAnimationOptionLayoutSubviews //提交动画的时候布局子控件,表示子控件将和父控件一同动画。
- UIViewAnimationOptionAllowUserInteraction //动画时允许用户交流,比如触摸
- UIViewAnimationOptionBeginFromCurrentState //从当前状态开始动画
- UIViewAnimationOptionRepeat //动画无限重复
- UIViewAnimationOptionAutoreverse //执行动画回路,前提是设置动画无限重复
- UIViewAnimationOptionOverrideInheritedDuration //忽略外层动画嵌套的执行时间
- UIViewAnimationOptionOverrideInheritedCurve //忽略外层动画嵌套的时间变化曲线
- UIViewAnimationOptionAllowAnimatedContent //通过改变属性和重绘实现动画效果,如果key没有提交动画将使用快照
- UIViewAnimationOptionShowHideTransitionViews //用显隐的方式替代添加移除图层的动画效果
- UIViewAnimationOptionOverrideInheritedOptions //忽略嵌套继承的选项
//时间函数曲线相关 - UIViewAnimationOptionCurveEaseInOut //时间曲线函数,由慢到快
- UIViewAnimationOptionCurveEaseIn //时间曲线函数,由慢到特别快
- UIViewAnimationOptionCurveEaseOut //时间曲线函数,由快到慢
- UIViewAnimationOptionCurveLinear //时间曲线函数,匀速
//转场动画相关的 - UIViewAnimationOptionTransitionNone //无转场动画
- UIViewAnimationOptionTransitionFlipFromLeft //转场从左翻转
- UIViewAnimationOptionTransitionFlipFromRight //转场从右翻转
- UIViewAnimationOptionTransitionCurlUp //上卷转场
- UIViewAnimationOptionTransitionCurlDown //下卷转场
- UIViewAnimationOptionTransitionCrossDissolve //转场交叉消失
- UIViewAnimationOptionTransitionFlipFromTop //转场从上翻转
- UIViewAnimationOptionTransitionFlipFromBottom //转场从下翻转
补充:关于最后一组转场动画它一般是用在这个方法中的:
- [UIView transitionFromView: toView: duration: options: completion:^(BOOL finished) {}];
该方法效果是插入一面视图移除一面视图,期间可以使用一些转场动画效果。
0 0
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- iOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- IOS动画中的枚举UIViewAnimationOptions
- iOS动画中的枚举UIViewAnimationOptions
- IOS常用动画中的枚举UIViewAnimationOptions
- 动画的枚举UIViewAnimationOptions
- iOS 动画UIViewAnimationOptions类型
- IOS-相对移动(CGAffineTransformMakeTranslation()),动画UIViewAnimationOptions
- UIViewAnimationOptions枚举笔记
- 【郑轻】[1770]Lovely Ball
- hdu 计算机学院大学生程序设计竞赛(2015’12)The Magic Tower
- NYIST448 寻找最大数
- 求100~200间的质数
- C#学习笔记005-构造函数
- IOS动画中的枚举UIViewAnimationOptions
- 64. 创建音乐播放管理类
- UI - UIScrollView、UIPageControl
- 51Nod 1002 数塔取数问题
- vmware虚拟机不能使用键盘该怎么办?
- 算法设计题2.31-线性表-第2章-《数据结构习题集》-严蔚敏吴伟民版
- Win32 播放MP3
- mongodb初步
- CMake入门教程 http://blog.csdn.net/fan_hai_ping/article/details/42524205