p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 14.0px "Heiti SC Light"; color: #323333; background-color: #f3feec }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 14.0px Arial; color: #323333; background-color: #f3feec; min-height: 16.0px }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 14.0px "PingFang SC"; color: #323333; background-color: #f3feec }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px }
p.p6 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 24.0px; font: 14.0px Arial; color: #323333; background-color: #f3feec }
span.s1 { font: 14.0px Arial }
span.s2 { color: #ffffff }
span.s3 { }
span.s4 { font: 11.0px "PingFang SC" }
span.s5 { font: 14.0px "Heiti SC Light" }
span.s6 { color: #2d64b3 }
span.s7 { font: 14.0px "Heiti SC Light"; color: #2d64b3 }

CATransition类实现层的转场动画。你可以从一组预定义的转换或者通过提供定制的CIFilter实例来指定转场效果。

例如:控制器之间的跳转

LoginViewController *myVC = [[LoginViewController alloc]init];

myVC.tuichu = @"tuichu";

//创建动画

CATransition *animation = [CATransition animation];

//设置运动轨迹的速度

animation.timingFunction = UIViewAnimationCurveEaseInOut;

//设置动画类型为立方体动画

animation.type = @"cube";

//设置动画时长

animation.duration =0.5f;

//设置运动的方向

animation.subtype =kCATransitionFromRight;

//控制器间跳转动画

[[UIApplication sharedApplication].keyWindow.layer addAnimation:animation forKey:nil];

[self presentViewController:myVC animated:NO completion:nil];

//例如;控制器中添加 view

CATransition *animation = [CATransition animation];

animation.timingFunction = UIViewAnimationCurveEaseInOut;

animation.type = @"rippleEffect"; //声波效果

animation.duration = 0.3;

animation.subtype = kCATransitionFromBottom;

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

[self.view addSubview:view];

  //定义个转场动画

  CATransition *animation = [CATransition animation];

  //转场动画持续时间

  animation.duration = 0.2f;

  //计时函数,从头到尾的流畅度???

  animation.timingFunction=UIViewAnimationCurveEaseInOut;

  //转场动画类型

  animation.type = kCATransitionReveal;

  //转场动画将去的方向

  animation.subtype = kCATransitionFromBottom;

  //动画时你需要的实现

  self.tabBarController.tabBar.hidden = YES;

  //添加动画 (转场动画是添加在层上的动画)

  self.tabBarController.tabBar.layer addAnimation:animation forKey:@"animation"];

  说明:

  duration:动画持续的时长。

  timingFunction:没明白(谁明白的说明一下吧)

  type:转场动画的类型。如果在一个自定义的转场动画中指定的过滤器属性,此属性将被忽略。

  type共有四种类型:

  NSString * const kCATransitionFade;//逐渐消失

  NSString * const kCATransitionMoveIn;//移入

  NSString * const kCATransitionPush;//平移(暂且这么称呼吧)

  NSString * const kCATransitionReveal;//显露

  默认类型为kCATransitionFade。

  subtype:转场动画将要去往的方向。

  subtpye有四种类型:

  NSString * const kCATransitionFromRight;

  NSString * const kCATransitionFromLeft;

  NSString * const kCATransitionFromTop;

  NSString * const kCATransitionFromBottom;

  默认方向是nil。

  [self.tabBarController.tabBar.layer addAnimation:animation forKey:@"animation"];

  转场动画是添加给layer的!

  switch (btn.tag) {

  case 0:

  animation.type = @"cube";//---立方体

  break;

  case 1:

  animation.type = @"suckEffect";//103 吸走的效果

  break;

  case 2://前后翻转效果

  animation.type = @"oglFlip";//When subType is "fromLeft" or "fromRight", it's the official one.

  break;

  case 3:

  animation.type = @"rippleEffect";//110波纹效果

  break;

  case 4:

  animation.type = @"pageCurl";//101翻页起来

  break;

  case 5:

  animation.type = @"pageUnCurl";//102翻页下来

  break;

  case 6:

  animation.type = @"cameraIrisHollowOpen ";//107//镜头开

  break;

  case 7:

  animation.type = @"cameraIrisHollowClose ";//106镜头关

  break;

  default:

  break;

  }

iOS 页面之间的专长动画控制器间的转换的更多相关文章

  1. iOS 页面之间的转场动画控制器间的转换

    CATransition类实现层的转场动画.你可以从一组预定义的转换或者通过提供定制的CIFilter实例来指定转场效果. 例如:控制器之间的跳转 LoginViewController *myVC ...

  2. IOS 页面之间的传值(主讲delegate)

    IOS的Delegate,通俗一点说就是页面之间的传值. 总结一下现在知道的IOS页面之间传值的方式有三种 1.使用NSNotification发送通知的传值 主要是通过NSNotificationC ...

  3. IOS 页面之间的跳转

    1.UINavigationController popToViewController 对应popViewControllerAnimated: 也可以使用: [self.navigationCon ...

  4. AngularJs开发——指令与控制器间的通信

    (原文:http://www.html5jscss.com/controller-between-directive.html) 指令与控制器之间通信,跟控制器间的通信.指令间通信也类似,也是下几种方 ...

  5. IOS 在控制器间跳转实现过渡动画

    已经掌握了CALayer下的CATransition动画在同一个控制器下实现,但是在不同控制器间跳转又该如何实现呢? MyViewController *myVC = [[MyViewControll ...

  6. iOS页面间传值的六种方式

    一般ios页面间的传值方式分为6种:1.属性传值:2.block:3.delegate:4.UserDefault:5.单例:6.通知. 0&1.block 先说我最常用的block吧,属性传 ...

  7. iOS页面间传值的方式(Delegate/NSNotification/Block/NSUserDefault/单例)

    iOS页面间传值实现方法:1.通过设置属性,实现页面间传值:2.委托delegate方式:3.通知notification方式:4.block方式:5.UserDefault或者文件方式:6.单例模式 ...

  8. ios页面间传递参数四种方式

    ios页面间传递参数四种方式 1.使用SharedApplication,定义一个变量来传递. 2.使用文件,或者NSUserdefault来传递 3.通过一个单例的class来传递 4.通过Dele ...

  9. iOS页面间传值的方式(NSUserDefault/Delegate/NSNotification/Block/单例)

    iOS页面间传值的方式(NSUserDefault/Delegate/NSNotification/Block/单例) 实现了以下iOS页面间传值:1.委托delegate方式:2.通知notific ...

随机推荐

  1. 最全Jenkins+SVN+iOS+cocoapods环境搭建及其错误汇总

    前言 持续集成是敏捷开发中重要的一部分,为保证新功能的开发,又保证旧功能的维护,从一个冲刺到下个冲刺.持续集成工具是我们保证开发和维护并行的护航者,现在流行的集成工具有很多,例如: 1.Jenkins ...

  2. ExtJS+Handler入门显示

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.c ...

  3. alex python of day2

      模块 sys模块:sys模块是用c语言写的,所以在lib下是不会有sys.py这个文件存在 1 import sys 2 print(sys.path) #打印环境变量 3 print(sys.a ...

  4. android shape 大全 (转)

    1. 各属性的配置语法 在项目 res/drawable 文件夹中创建一个以 shape 为根节点的 XML 文件,基本语法如下: <?xml version="1.0" e ...

  5. “战术竞技类”外挂打击已开始!揭秘腾讯We Test游戏安全服务新动作!

    商业转载请联系腾讯WeTest获得授权,非商业转载请注明出处. 原文链接:http://wetest.qq.com/lab/view/353.html We Test导读 国服PUBG的游戏安全将由我 ...

  6. Spring框架——IOC依赖注入

    本来想把IOC和AOP一起介绍的,但是AOP内容太多了,所以就分开了,最后的结果就是这一篇只剩下一点点了.这不是第一次写关于IOC的文章了,之前写过Java反射,Java注解,也写过通过XML解析实现 ...

  7. 计算机网络初探(ip协议)

    粗读了两遍计算机网络(谢希仁),对于计算计算机网络算是有了一个初步的了解,所以打算写一篇文章(希望是教程)进行巩固(主要围绕IP协议). 局域网 因特网的产生和广泛使用极大地改变了我们的生活,但对于不 ...

  8. 使用SSH快速下载Git项目

    文章首发于[博客园-陈树义],点击跳转到原文使用SSH快速下载Git项目. Git下载项目的几种方式 Git是常用的代码版本技术,而GitLab则是开源的Git版本管理软件,GitLab是最受欢迎的版 ...

  9. MongoDb安装--yum安装

    本帖最后由 草包 于 2017-5-2 09:57 编辑 [Shell] 纯文本查看 复制代码 ? 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 ...

  10. C语言socket编程----实现UDP通信

    TCP/IP协议叫做传输控制/网际协议,又叫做网络通信协议.实际上,它包括上百个功能的协议. 套接字(socket):在网络中用来描述计算机中不同程序与其他计算程序的通信方式. 套接字分为三类; 流式 ...