• 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)];  
  • 相关阅读:
    怎样让人的一生价值最大
    [LeetCode][Java] Minimum Depth of Binary Tree
    KVC和KVO
    js获取单独一个checkbox是否被选中
    It's not a Bug, It's a Feature! (poj 1482 最短路SPFA+隐式图+位运算)
    超声波测距温度补偿
    系统封装接口层 cmsis_os
    STM32F4XX高效驱动篇2 I2C
    Stm32f103 ADC 学习笔记
    Stm32f103 DAC 学习笔记
  • 原文地址:https://www.cnblogs.com/Camier-myNiuer/p/4449837.html
Copyright © 2020-2023  润新知