SwipeActions icon indicating copy to clipboard operation
SwipeActions copied to clipboard

Bug when swipe left and right

Open LomachenkoMA opened this issue 2 months ago • 1 comments

                    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)

LomachenkoMA avatar Apr 15 '24 15:04 LomachenkoMA