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. SQL Server 初识游标

    ---恢复内容开始--- 游标:游标是一种能从包含多个数据的结果集每次提取一条的机制 游标的特点是: 检索得到的数据集更加灵活 可有针对性的对数据进行操作 拥有对数据进行删除和更新的能力 为何使用游标 ...

  2. Java日志框架那些事儿

    文章首发于[博客园-陈树义],点击跳转到原文Java日志框架那些事儿. 在项目开发过程中,我们可以通过 debug 查找问题.而在线上环境我们查找问题只能通过打印日志的方式查找问题.因此对于一个项目而 ...

  3. kafka 集群搭建

    环境:ubuntu14.04 版本:jdk1.8,zookeeper 3.4.10,kafka 2.11 搭建步骤: 1. 搭建zookeeper集群 参考链接:zookeeper集群搭建 2. 下载 ...

  4. javascript图片隐写术,感觉可以用它来干点有想法的事情

    1.什么是图片隐写术? 权威的wiki说法是“隐写术是一门关于信息隐藏的技巧与科学,所谓信息隐藏指的是不让除预期的接收者之外的任何人知晓信息的传递事件或者信息的内容.”,图片隐写术简而言之就是利用图片 ...

  5. poj2485 highwaysC语言编写

    /*HighwaysTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 33595Accepted: 15194DescriptionTh ...

  6. zzuli 2130: hipercijevi 链式前向星+BFS+输入输出外挂

    2130: hipercijevi Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 595  Solved: 112 SubmitStatusWeb B ...

  7. Maven项目pom.xml文件报xxx\target\classes\META-INF\MANIFEST.MF (系统找不到指定的路径)

    在今天的学习Maven项目中遇到的这个错误:pom.xml文件报xxx\target\classes\META-INF\MANIFEST.MF (系统找不到指定的路径) 在Maven项目学习中,缓存问 ...

  8. Python2/3中的urllib库

    urllib库对照速查表 Python2.X Python3.X urllib urllib.request, urllib.error, urllib.parse urllib2 urllib.re ...

  9. Mysql的管理及使用

    第1章 Mysql的管理 1.1 连接管理mysql mysql[options] #Linux或UNIX shell提示符(终端窗口) mysql --help #查看帮助信息 mysql --ve ...

  10. Python爬虫(十九)_动态HTML介绍

    JavaScript JavaScript是网络上最常用也是支持者对多的客户端脚本语言.它可以收集用户的跟踪数据,不需要重载页面直接提交表单,在页面嵌入多媒体文件,甚至运行网页游戏. 我们可以在网页源 ...