diff --git a/Example/SwipeActionsExample/ContentView+Advanced.swift b/Example/SwipeActionsExample/ContentView+Advanced.swift index e7b45f8..b8bf6ff 100644 --- a/Example/SwipeActionsExample/ContentView+Advanced.swift +++ b/Example/SwipeActionsExample/ContentView+Advanced.swift @@ -40,7 +40,7 @@ extension ContentView { Container( title: "Adjusted Thresholds", details: - #".swipeToTriggerTrailingEdge(true)"#, + #".allowSwipeToTrigger()"#, #".swipeReadyToExpandPadding(0)"#, #".swipeReadyToTriggerPadding(0)"#, #".swipeMinimumPointToTrigger(0)"#, diff --git a/Example/SwipeActionsExample/ContentView+Basic.swift b/Example/SwipeActionsExample/ContentView+Basic.swift index 6e34a14..27ea98c 100644 --- a/Example/SwipeActionsExample/ContentView+Basic.swift +++ b/Example/SwipeActionsExample/ContentView+Basic.swift @@ -34,7 +34,7 @@ extension ContentView { if showingSwipeToTrigger { SwipeView { - Container(title: "Swipe to Trigger", details: ".swipeActionEdgeStyling()", ".swipeToTriggerTrailingEdge(true)") + Container(title: "Swipe to Trigger", details: ".allowSwipeToTrigger()") } trailingActions: { _ in SwipeAction("Clear") { withAnimation(.spring()) { @@ -58,8 +58,7 @@ extension ContentView { details: #"SwipeAction("1") {}"#, #"SwipeAction("Dismiss") {}"#, - ".swipeActionEdgeStyling()", - ".swipeToTriggerTrailingEdge(true)" + ".allowSwipeToTrigger()" ) } trailingActions: { _ in SwipeAction("1") {} diff --git a/README.md b/README.md index 8501749..568e68f 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,6 @@ struct ProgrammaticSwipeView: View { .background(Color.blue.opacity(0.1)) .cornerRadius(32) } - } leadingActions: { _ in } trailingActions: { context in SwipeAction("Tap to Close") { context.wrappedValue.state = .closed @@ -211,7 +210,6 @@ SwipeView { .frame(maxWidth: .infinity) .padding(.vertical, 32) .contentShape(Rectangle()) /// Enable swiping on the empty space. -} leadingActions: { _ in } trailingActions: { _ in SwipeAction("Hello!") { } }