GithubHelp home page GithubHelp logo

Change init of pop factories about anymotion HOT 2 CLOSED

hfossli avatar hfossli commented on August 18, 2024
Change init of pop factories

from anymotion.

Comments (2)

hfossli avatar hfossli commented on August 18, 2024

And we should also investigate wether we should inherit from ANYAnimation as well...

We could possibly go from this

POPBasicAnimation *alpha0 = [[[[POPBasicFactory propertyNamed:kPOPViewAlpha] duration:3] toValue:@0] build];
POPBasicAnimation *alpha1 = [[[[POPBasicFactory propertyNamed:kPOPViewAlpha] duration:3] toValue:@1] build];
POPBasicAnimation *frame0 = [[[[POPBasicFactory propertyNamed:kPOPViewFrame] duration:5] toValue:[NSValue valueWithCGRect:CGRectMake(100.0, 300.0, 50.0, 50.0)]] build];
POPBasicAnimation *frame1 = [[[[POPBasicFactory propertyNamed:kPOPViewFrame] duration:5] toValue:[NSValue valueWithCGRect:CGRectMake(100.0, 0.0, 50.0, 50.0)]] build];

AGAnimation *group1 = [AGAnimation group:@[
                                           [alpha0 animation:view0],
                                           [frame0 animation:view0],
                                           [alpha1 animation:view1],
                                           [frame1 animation:view1],
                                           ]];

to this

POPBasicFactory *alpha0 = [[[POPBasicFactory propertyNamed:kPOPViewAlpha object:view0] duration:3] toValue:@0];
POPBasicFactory *alpha1 = [[[POPBasicFactory propertyNamed:kPOPViewAlpha object:view0] duration:3] toValue:@1];
POPBasicFactory *frame0 = [[[POPBasicFactory propertyNamed:kPOPViewFrame object:view1] duration:5] toValue:[NSValue valueWithCGRect:CGRectMake(100.0, 300.0, 50.0, 50.0)]];
POPBasicFactory *frame1 = [[[POPBasicFactory propertyNamed:kPOPViewFrame object:view1] duration:5] toValue:[NSValue valueWithCGRect:CGRectMake(100.0, 0.0, 50.0, 50.0)]];

AGAnimation *group = [AGAnimation group:@[alpha0, frame0, alpha1, frame1]];

from anymotion.

hfossli avatar hfossli commented on August 18, 2024

600011a

from anymotion.

Related Issues (20)

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.