From 7e80641c5e6294911c8050f9f2412a552a636072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pozzobon?= Date: Wed, 20 Mar 2024 19:57:50 -0300 Subject: [PATCH] Update README.md --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4dd12a9..65e78a7 100644 --- a/README.md +++ b/README.md @@ -43,16 +43,20 @@ And that's it! It just works. In this case, `$isPresented` is a boolean binding.
Customization
- The default `.slideOverCard()` modifier will have a transition, drag controls and a dismiss button set by default. You can override this by setting the `dragEnabled`, `dragToDismiss` and `displayExitButton` boolean parameters: + The default `.slideOverCard()` modifier will have a transition, drag and tap controls and a dismiss button set by default. You can override this by manually setting the `SOCOptions` option set: ```swift // This creates a card that can be dragged, but not dismissed by dragging .slideOverCard(isPresented: $isPresented, options: [.disableDragToDismiss]) { } - // This creates a card that can't be dragged or dismissed by dragging + // This creates a card that can't be dragged nor dismissed by dragging .slideOverCard(isPresented: $isPresented, options: [.disableDrag, .disableDragToDismiss]) { } + + // This creates a card that can't be dismissed by an outside tap + .slideOverCard(isPresented: $isPresented, options: [.disableTapToDismiss]) { + } // This creates a card with no dismiss button .slideOverCard(isPresented: $isPresented, options: [.hideDismissButton]) { @@ -110,3 +114,6 @@ Button("Do something") { There's also the `SOCDismissButton()` view. This view will create the default dismiss button icon used for the card (based on https://github.com/joogps/ExitButton).
+ +## Demo +You can check out a demo project for this package in the [`demo`](https://github.com/joogps/SlideOverCard/tree/demo) branch of this repository.