Comments (6)
Yes, it is.
from stellar.
aView.moveX(5.0).duration(2.0).completion {
do_something()
}.then().moveX(7.0).duration(1).completion {
do_something()
}.animate()
from stellar.
Thanks. But the need is to create an animation step by step. So in your example the then
statement is added later on the code.
aView.moveX(5.0).duration(2.0).completion {
do_something()
}
// later...
aView.then().moveX(7.0).duration(1).completion {
do_something()
}
// later...
aView.animate()
from stellar.
Hum... There is something weird.
So code is:
_ = aView
.moveX(5.0)
.duration(2.0)
.completion {
do_something()
}
.then
// later...
_ = aView
.moveX(7.0)
.duration(1)
.completion {
do_something()
}
.then
// and at last
aView
.completion { do_something }
.animate
Last completion do not occur. Let's try by adding a delay
. So the last part of code is now:
aView
.delay (0.01)
.completion { do_something }
.animate
Last completion still not occur. But replacing delay by an animation, like rotate
make it work!
aView
.rotate (0.01)
.completion { do_something }
.animate
from stellar.
only 'delay' can not make an animation...
from stellar.
I solved this by moving then
to the top. So:
_ = aView
.then
.moveX(5.0)
.duration(2.0)
.completion {
do_something()
}
// later...
_ = aView
.then
.moveX(7.0)
.duration(1)
.completion {
do_something()
}
// and at last
aView
.completion { do_something }
.animate
from stellar.
Related Issues (20)
- Does it work with autolayout ? HOT 1
- Swift 3 errors HOT 3
- Future HOT 4
- Affine Transform HOT 2
- cancel/remove all animations
- "has no member" error HOT 12
- makeAlpha calls are crashing HOT 6
- Using makeAlpha on 0.66 generates crash HOT 2
- Update library in Cocoapods
- Infinity repeatCount. HOT 4
- Can't build in Swift 4 HOT 1
- "Unsupport this animation type!" exception HOT 9
- Migrate Examples to Newest Swift/Xcode version HOT 2
- Stellar does not play well with Carthage
- Spanish translate
- Swift 4 support HOT 2
- Stellar HOT 2
- Buggy examples HOT 2
- scaleXY doesn't work as expected HOT 2
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 stellar.