Skip to content

how can I stop LottieButton animation in SwiftUI #2227

Closed Answered by X901
X901 asked this question in Q&A
Discussion options

You must be logged in to vote

I found the sloution for this

                    LottieButton(animation: .named(item.icon)) {
                        selectedTab = item.tab
                    }
                    .configure { lottieAnimationView in
                        
                        // don't allow taping on same item when it enable
                        lottieAnimationView.isEnabled = selectedTab != item.tab
                        
                        // play it once, when the item is active
                        if selectedTab == item.tab {
                            lottieAnimationView.animationView.play()
                        }
                        
                        // return i…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by X901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant