Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aheze committed Apr 13, 2023
1 parent bfc11fe commit 41e6f6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Example/SwipeActionsExample/ContentView+Advanced.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extension ContentView {
Container(
title: "Adjusted Thresholds",
details:
#".swipeToTriggerTrailingEdge(true)"#,
#".allowSwipeToTrigger()"#,
#".swipeReadyToExpandPadding(0)"#,
#".swipeReadyToTriggerPadding(0)"#,
#".swipeMinimumPointToTrigger(0)"#,
Expand Down
5 changes: 2 additions & 3 deletions Example/SwipeActionsExample/ContentView+Basic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -58,8 +58,7 @@ extension ContentView {
details:
#"SwipeAction("1") {}"#,
#"SwipeAction("Dismiss") {}"#,
".swipeActionEdgeStyling()",
".swipeToTriggerTrailingEdge(true)"
".allowSwipeToTrigger()"
)
} trailingActions: { _ in
SwipeAction("1") {}
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!") { }
}
Expand Down

0 comments on commit 41e6f6d

Please sign in to comment.