Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when swipe left and right #22

Open
LomachenkoMA opened this issue Apr 15, 2024 · 1 comment
Open

Bug when swipe left and right #22

LomachenkoMA opened this issue Apr 15, 2024 · 1 comment

Comments

@LomachenkoMA
Copy link

LomachenkoMA commented Apr 15, 2024

                    VStack {
                        SwipeViewGroup{
                            ForEach(outRecord, id:\.self){ out in
                                SwipeView {
                                    OutCardView(out)
                                        .onTapGesture {
                                            outVM.loadSingle(out: out)
                                            mainStack.append(.outSummary)
                                        }
                                        .frame(maxWidth: .infinity)
                                        .contentShape(Rectangle())
                                } leadingActions: { _ in
                                    SwipeAction("delete", systemImage: "trash.circle", backgroundColor: .red) {
                                        
                                    }.allowSwipeToTrigger()
                                        .foregroundColor(.white)
                                } trailingActions: { _ in
                                    SwipeAction("copy", systemImage: "doc.circle", backgroundColor: .yellow) {
                                        
                                    }.allowSwipeToTrigger()
                                        .foregroundColor(.white)
                                }
                                .swipeActionCornerRadius(1)
                                
                                
                                Divider()
                                    .padding()
                            }
                        }
                    }

when i swipe left and right, there is an error kept shown up:

Invalid sample AnimatablePair<AnimatablePair<CGFloat, CGFloat>, AnimatablePair<CGFloat, CGFloat>>(first: SwiftUI.AnimatablePair<CoreGraphics.CGFloat, CoreGraphics.CGFloat>(first: 18.0, second: 0.0), second: SwiftUI.AnimatablePair<CoreGraphics.CGFloat, CoreGraphics.CGFloat>(first: 0.0, second: 0.0)) with time Time(seconds: 0.0) > last time Time(seconds: 0.016702291672118008)

@ijunfly
Copy link

ijunfly commented Apr 18, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants