zoukankan      html  css  js  c++  java
  • 转场动画

     
    UIView* fromView = (self.header2== button)?self.header2:self.header1;
     
    UIView * toView = (self.header1 == button)?self.header2 : self.header1;
     
    //fromView 转场动画完成之后,会把自己主动重父亲控件中移除
    //UIViewAnimationOptionShowHideTransitionViews 离场视图,隐藏起来,不会从父控件中移除
     
    [UIView transitionFromView:fromView toView:toView duration:1 options:UIViewAnimationOptionTransitionFlipFromLeft|UIViewAnimationOptionShowHideTransitionViews completion:nil];
     
     
     
     
    UIViewAnimationOptionRepeat                    = 1 <<  3, // repeat animation indefinitely
     
    UIViewAnimationOptionAutoreverse               = 1 <<  4, // if repeat, run animation back and forth
     
    UIViewAnimationOptionShowHideTransitionViews   = 1 <<  8, // flip to/from hidden state instead of adding/removing
     
    UIViewAnimationOptionCurveEaseInOut            = 0 << 16, // default
    UIViewAnimationOptionCurveEaseIn               = 1 << 16,
    UIViewAnimationOptionCurveEaseOut              = 2 << 16,
    UIViewAnimationOptionCurveLinear               = 3 << 16,
     
    UIViewAnimationOptionTransitionNone            = 0 << 20, // default
    UIViewAnimationOptionTransitionFlipFromLeft    = 1 << 20,
    UIViewAnimationOptionTransitionFlipFromRight   = 2 << 20,
    UIViewAnimationOptionTransitionCurlUp          = 3 << 20,
    UIViewAnimationOptionTransitionCurlDown        = 4 << 20,
    UIViewAnimationOptionTransitionCrossDissolve   = 5 << 20,
    UIViewAnimationOptionTransitionFlipFromTop     = 6 << 20,
    UIViewAnimationOptionTransitionFlipFromBottom  = 7 << 20,
     
     
     
    UIViewAnimationOptionLayoutSubviews //提交动画的时候布局子控件,表示子控件将和父控件一同动画。
     
     UIViewAnimationOptionAllowUserInteraction //动画时允许用户交流,比如触摸
     
     UIViewAnimationOptionBeginFromCurrentState //从当前状态开始动画
     
     UIViewAnimationOptionRepeat //动画无限重复
     
     UIViewAnimationOptionAutoreverse //执行动画回路,前提是设置动画无限重复
     
     UIViewAnimationOptionOverrideInheritedDuration //忽略外层动画嵌套的执行时间
     
     UIViewAnimationOptionOverrideInheritedCurve //忽略外层动画嵌套的时间变化曲线
     
     UIViewAnimationOptionAllowAnimatedContent //通过改变属性和重绘实现动画效果,如果key没有提交动画将使用快照
     
     UIViewAnimationOptionShowHideTransitionViews //用显隐的方式替代添加移除图层的动画效果
     
     UIViewAnimationOptionOverrideInheritedOptions //忽略嵌套继承的选项
     
     //时间函数曲线相关
     
     UIViewAnimationOptionCurveEaseInOut //时间曲线函数,由慢到快
     
     UIViewAnimationOptionCurveEaseIn //时间曲线函数,由慢到特别快
     
     UIViewAnimationOptionCurveEaseOut //时间曲线函数,由快到慢
     
     UIViewAnimationOptionCurveLinear //时间曲线函数,匀速
     
     //转场动画相关的
     
     UIViewAnimationOptionTransitionNone //无转场动画
     
     UIViewAnimationOptionTransitionFlipFromLeft //转场从左翻转
     
     UIViewAnimationOptionTransitionFlipFromRight //转场从右翻转
     
     UIViewAnimationOptionTransitionCurlUp //上卷转场
     
     UIViewAnimationOptionTransitionCurlDown //下卷转场
     
     UIViewAnimationOptionTransitionCrossDissolve //转场交叉消失
     
     UIViewAnimationOptionTransitionFlipFromTop //转场从上翻转
     
    UIViewAnimationOptionTransitionFlipFromBottom //转场从下翻转
  • 相关阅读:
    轻松搞定Ajax(分享下自己封装ajax函数,其实Ajax使用很简单,难是难在你得到数据后来怎样去使用这些数据)
    模块化开发,SesJS简单总结
    轻松实现HTML5时钟(分享下自己对canvas的理解,原来没你想像的那么难哦)
    轻松搞定javascript预解析机制(搞定后,一切有关变态面试题都是浮云~~)
    javascript中可处理的浮点数的最高精度(和小数的一些小特性)
    PyLucene检索demo
    PyLucene索引DEMO
    Lucene类介绍
    PyLucene 的安装
    写一个程序,打印数字1到100,3的倍数打印“Fizz”来替换这个数,5的倍数打印“Buzz”,对于既是3的倍数又是5的倍数的数字打印“FizzBuzz”
  • 原文地址:https://www.cnblogs.com/sea-star3/p/5301101.html
Copyright © 2011-2022 走看看