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

  • 相关阅读:
    Linux下动态库(.so)和静态库(.a) 的区别
    CTS、CLS、CLR
    ASP.NET简介及网页基础知识
    ASP.NET MVC中ActionResult的不同返回方式
    ADO.NET中的数据库帮助类
    ASP.NET MVC 方法View返回的两种方式
    使用win10 IIS 发布局域网网站
    ASP.NET MVC 给Action的参数赋值的方式
    ASP.NET MVC简单流程解释(传值方式)
    ASP.NET MVC 简介(附VS2019和VSCode版示例)
  • 原文地址:https://www.cnblogs.com/GJ-ios/p/5397740.html
Copyright © 2011-2022 走看看