zoukankan      html  css  js  c++  java
  • UI

     1. 从一个视图控制器跳转另一个视图控制器的方式是可以进行设置的

     CATransition *animation = [[CATransition alloc]init];

     animation.duration = 1;

     animation.type = @"pageCurl";  //立方体翻滚效果

     animation.subtype = @"fromBottom";  //从底部开始

    [self.view.window.layer addAnimation:animation forKey:nil];

    //若封装扩展方法,可以直接调用该方法代替上边的 5

     [self.view.superview addTansitionAnimationType:TranstionTypeCube duration:1 direction:TransitionDirectionFromBottom];

     1.1 过渡效果

     fade     //交叉淡化过渡(不支持过渡方向)

     push     //新视图把旧视图推出去

     moveIn   //新视图移到旧视图上面

     reveal   //将旧视图移开,显示下面的新视图

     cube     //立方体翻滚效果

     oglFlip  //上下左右翻转效果

     suckEffect   //收缩效果,如一块布被抽走(不支持过渡方向)

     rippleEffect //滴水效果(不支持过渡方向)

     pageCurl     //向上翻页效果

     pageUnCurl   //向下翻页效果

     cameraIrisHollowOpen  //相机镜头打开效果(不支持过渡方向)

     cameraIrisHollowClose //相机镜头关上效果(不支持过渡方向)

     1.2 翻转方向

     fromLeft   //从左边

     fromRight  //从右边

     fromTop    //从上边

     fromBottom //从底部

     在使用过程中,为使用方便,我们可以对UIView进行类拓展,将使用的翻转效果封装成枚举常量,方便我们快速查找,调用相应的方法即可快速设置

     如调用方法为:

     -(void)addTansitionAnimationType:(TranstionType )type duration:(NSTimeInterval)duration direction:(TransitionDirection )direction;

     类扩展示例:见 --> UIViewAnimation

  • 相关阅读:
    mysql分组统计后将结果顺序排列(union实现)
    mysql格式化日期
    yaf框架安装
    如何通过PHP将excel的数据导入MySQL中
    yii日志保存机制
    安装PyInstaller打包python
    python正则表达式详解
    Python中类的定义与使用
    例子 使用sqlite3 数据库建立数据方式
    python操作轻量级数据库
  • 原文地址:https://www.cnblogs.com/GJ-ios/p/5397740.html
Copyright © 2011-2022 走看看