Comments (17)
This is totally out of scope of this very well defined and well encapsulated library. If you want chaining use another library that is designed for chaining, eg. PromiseKit. Adding chaining to pop would spoil pop a little bit.
from pop.
There are two ways to currently chain animations. One approach, is to set the animation beginTime to some offset from CACurrentMediaTime(). Another approach, if solely focused on starting the next animation when the previous one completes, is to use the delegate/completion handler to start the next one. Do either of these work? If not, could you elaborate a little more on what you're trying to accomplish?
from pop.
@kimon does Pop provide something CAAnimationGroup
? I guess that's what @kirualex is refering to.
from pop.
@RuiAAPeres @kimon delegation/completion handlers work quite well but as soon as you handle multiple animations (in sequence or not), it quickly becomes spaghetti.
An approach like CPAnimationSequence to queue animations could result in more clear and maintainable code.
from pop.
The completionBlock
property might allow declaring chained animations in an easier-to-understand manner, since it would let the code for all of the animations stay in the same place.
from pop.
In the JS world TweenMax/TimelineMax are the most developed animation frameworks. Take a look if you are looking for inspiration on how chaining of animations could be done in a really simple yet powerful way.
http://www.greensock.com/get-started-js/#sequencing
This lib is so flexible, it's only limitation is the platform. I'd love to have something like this in POP.
from pop.
Does it make sense in a simulation context (pause, reverse, seek etc)? I mean pop isn't just about tweening, but also about adding dynamics to any object. I don't know if dynamics should be reversed, paused etc. Especially not seeked because duration of say a spring animation is not known up front. I guess one could do the reversing by just flip around the from- and to-values, but other than that? To me it seems like if these things were added it could very likely be slowing down further development of pop.
from pop.
I am too trying to create a sequence of animations by passing elements to a function like so: func slideLabelsOut(labelArguments: UILabel...) { perform animations }. The thing is currently I have to hardcode the animation for each label so they start one after the other by using CACurrentMediaTime(). It's a lot of repetitive code and it's not really pretty.
from pop.
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
from pop.
Anything new?
from pop.
+1 this would be awesome
from pop.
+1 Any news?
from pop.
+1
from pop.
+1, still waiting for any news
from pop.
I don't think this project, at this point in time, is being actively maintained. So @fernandolicon I wouldn't count on this feature. 😞
from pop.
@RuiAAPeres yeah, I just saw that last update was some time ago. Thanks for the heads up, I would keep using delegate methods 😕
from pop.
related pull request:
#275
from pop.
Related Issues (20)
- paper link does not exist
- Couldnt be able to integrate this with Swift 3.0 project by following the same commands. HOT 1
- No such file or directory error while building the workspace
- Errors should be thrown when animation parameters don't match animation parameters
- In memory of the Facebook Paper HOT 1
- Why not kPOPLayerRotationZ this enumeration? I want to rotate the animation around the Z axis. HOT 2
- Cannot works with Snapkit?
- Do you have the scenekit+pop demo?
- iostream file not found - Xcode 9.3.1 - Swift 4 HOT 3
- How to get the progress of the animation
- _POPPropertyAnimationState isPaused reset the progress
- Installation
- CocoaPods update HOT 5
- If toValue equals the target's current value then completionBlock will fire immediately HOT 1
- Carthage issue HOT 1
- problem with same animation HOT 1
- i feel confused ,what the function work for ‘ [self _scheduleProcessPendingList]’
- POPSpringAnimation removedOnCompletion not working
- Spring animation not working anymore following iOS 13 update HOT 5
- Swift Package Manager Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pop.