Giter Site home page Giter Site logo

gwlzcdm's Introduction

GWLZCDM

这是我在别人哪里学到的一个类似于格瓦拉电影的转场动画,我在里面改了一下,用一个导航控制器去执行不同的Push效果 #PUSH 这是带有动画效果的一个Push

- (void)pushViewController:(UIViewController *)viewController isAnimation:(BOOL)isAnimation{
    self.isAnimation = isAnimation;
    self.isPush = YES;
    [super pushViewController:viewController animated:YES];
}

当self.isAnimation = YES;Push就会带有那种动画的效果,反之就不会带有动画效果;

#POP 这个就是返回的时候不带有动画效果的方法

-(UIViewController *)popViewControllerAnimated:(BOOL)animated{
    self.isPush = NO;
    return [super popViewControllerAnimated:animated];
}

这就是返回的时候带有效果的Pop

- (UIViewController *)popViewControllerWithAnimated:(BOOL)animated isAnimation:(BOOL)isAnimation{
    self.isPush = NO;
    self.isAnimation = isAnimation;
    return [super popViewControllerAnimated:animated];
}

讨论

最近有个朋友给我提了一个小问题,说是第二个界面滑动的时候,电影海报会有个BUG,这里我做了改进。 我们可以再CaibdeAnimation这个类中的push代码模块中- (void)cAibDePushAnimation{}这个方法里面的一个代码注释掉就可以解决了,这个代码就是[contentView bringSubviewToFront:imageView];

gwlzcdm's People

Contributors

caibde avatar

Watchers

James Cloos avatar bingo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.