
Swipe Actions Row
A custom list row with swipe-to-reveal actions whose icons bounce in as they appear. Rubber-band resistance, a full-swipe snap with haptics, and rows that collapse smoothly when deleted.
- list
- gesture
- action
snippet.swift301 lines
6 files • Scroll to see all →
/// An action revealed by swiping a `SwipeActionsRow`.public struct SwipeActionsRowAction: Identifiable { public let id = UUID() let title: String let systemImage: String let tint: Color /// Destructive actions slide the row away before running, so the parent /// can remove it and let the list collapse smoothly. let isDestructive: Bool let handler: () -> Void public init(_ title: String, systemImage: String, tint: Color, isDestructive: Bool = false, handler: @escaping () -> Void) { self.title = title self.systemImage = systemImage self.tint = tint self.isDestructive = isDestructive self.handler = handler }}Viewing: Action.swift•1 of 6