zoukankan      html  css  js  c++  java
  • 用diss 实现 push动画

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    {
        
        AAAViewController * aaa = [[AAAViewController alloc]init];
        CATransition * transition = [CATransition animation];
        transition.duration = 0.3;
        transition.type = kCATransitionPush;
        transition.subtype = kCATransitionFromRight;
        [self.view.window.layer addAnimation:transition forKey:nil];
        [self presentViewController:aaa animated:NO completion:nil];
        
    }
    -(void )touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    {
        CATransition * transition = [CATransition animation];
        transition.duration = 0.3;
        transition.type = kCATransitionPush;
        transition.subtype = kCATransitionFromLeft;
        [self.view.window.layer addAnimation:transition forKey:nil];
        [self dismissViewControllerAnimated:NO completion:nil];
    }

    presentViewController和dismissViewControllerAnimated  实现 pushViewController和popViewControllerAnimated动画

  • 相关阅读:
    【Qt】Qt软件打包发布
    最大公约数最小公倍数
    random实现验证码
    sort 和sorted的 区别
    Python-内置数据结构之元组(tuple)
    BZOJ 1112 线段树
    POJ 1682 DP
    POJ 1671 第二类斯特林数
    BZOJ 1592 DP
    POJ 1636 DFS+DP
  • 原文地址:https://www.cnblogs.com/sayimba/p/5663269.html
Copyright © 2011-2022 走看看