zoukankan      html  css  js  c++  java
  • pushViewController自定义动画http://blog.csdn.net/ralbatr/article/details/22039233

     本文转载至  http://blog.csdn.net/ralbatr/article/details/22039233
    实现的主要代码如下:
    1. CATransition *transition = [CATransition animation];  
    2. transition.duration = 1.0f;  
    3. transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];  
    4. transition.type = @"cube";  
    5. transition.subtype = kCATransitionFromRight;  
    6. transition.delegate = self;  
    7. [self.navigationController.view.layer addAnimation:transition forKey:nil];  
    8.   
    9. FirstViewController *firstViewController = [[DemoViewController alloc]init];  
    10. [self.navigationController pushViewController: firstViewController animated:YES];   

    其中的动画类型有:
    1. animation.type = kCATransitionFade;  
    2.   
    3. animation.type = kCATransitionPush;  
    4.   
    5. animation.type = kCATransitionReveal;  
    6.   
    7. animation.type = kCATransitionMoveIn;  
    8.   
    9. animation.type = @"cube";  
    10.   
    11. animation.type = @"suckEffect";  
    12.   
    13. // 页面旋转  
    14. animation.type = @"oglFlip";  
    15.   
    16. //水波纹  
    17. animation.type = @"rippleEffect";  
    18.   
    19. animation.type = @"pageCurl";  
    20.   
    21. animation.type = @"pageUnCurl";  
    22.   
    23. animation.type = @"cameraIrisHollowOpen";  
    24.   
    25. animation.type = @"cameraIrisHollowClose";  

    返回按钮的动画实现事件

    1. // 修改导航栏的 左边的标题  
    2. self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIButtonTypeRoundedRect target:self action:@selector(back)];  
  • 相关阅读:
    性能优化随笔
    Linux文件类型及如何查看,修改文件读写权限
    ngx_pagespeed
    用U盘安装Linux系统的简单方法
    Maven 3 入门 安装与配置
    CentOS 6.2 安装教程
    各种代码文件中的注释格式
    Linux下的WebLogic安装部署
    Win8常用快捷键
    Jenkins入门总结
  • 原文地址:https://www.cnblogs.com/Camier-myNiuer/p/4449837.html
Copyright © 2011-2022 走看看