GithubHelp home page GithubHelp logo

agens-no / anymotion Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 9.0 13.54 MB

one unified API for animating UIKit, CoreAnimation, POP and your library of choice.

License: Other

Objective-C 78.86% Ruby 0.49% C 19.26% Swift 1.40%

anymotion's People

Contributors

christofferengstrom avatar hfossli avatar jalmaas avatar kostiakoval avatar matshau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

anymotion's Issues

Remove `next`

I think we should remove next from the ANYAnimation class. It is inconsistent between engines. POP triggers next on each write and UIKit triggers and CA triggers once.

Add operator: `repeat:n`

We currently support repeat, but as a colleague stated it would be great to have the possiblity to say [anim repeat:5].

Add operator: `+[ANYAnimation chain:]`

Takes an array of ANYAnimation-objects and subscribes to them one at a time.

This [ANYAnimation chain:@[a, b, c, d]] should be equivalent to [[[a then:b] then:c] then:d].

Change init of pop factories

Now it is +[POPBasicFactory propertyNamed:] it should be +[POPBasicFactory propertyNamed:object:] where object can be a view, a layer or any NSObject.

Optional facebook/pop

First of, kudos on a really neat wrapper library around animations. Personally I hope Apple would Sherlock from these kind of libraries in the future. One thing that struck me as a potential improvement to the library is to make the pop animations optional. If you are looking for just a neat wrapper around animation but don't really have or see the need for the entire Facebook/pop framework, it would be neat to be able to opt-out.

PromiseKit has solved this by using extensions, maybe you guys could do the same for pop, or any other framework for that mano. So if you one day have the need, then you just add the extension and BAM! pop is just there. Anyways, looks great. Keep up the good work!

References:

https://github.com/mxcl/PromiseKit#extensions

Investigate wether factories should inherit from `ANYAnimation`

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]];

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.