简体   繁体   中英

SwiftUI how to chain 2 animations?

I'm trying to animate a line moving in a circle then using this library to add a second shimmer animation. The problem is they never both work, either one or the other will animate depending how if conditionIsTrue how can I chain them so that they work in succession?

                      Circle()
                        .animation(.linear, value: 0.8)
                        .if(conditionIsTrue)) { $0.shimmering(active: true, duration: 0.9, bounce: false) }

Currently no chaining animation in SwiftUI. You can add a delay to the shimmering animation to run it after the first animation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM