SlideOverCard icon indicating copy to clipboard operation
SlideOverCard copied to clipboard

No padding around card

Open sedestrian opened this issue 2 years ago • 4 comments

Hi, I have iOS 15 and iPhone 13 Pro, the card that appears on my screen touches the edges of the screen and has no padding on left, right and bottom.

sedestrian avatar Nov 25 '21 00:11 sedestrian

@sedestrian Without code it is quite hard to help. The issue is probably due to some modifiers that's propagating to the Card.

Amnell avatar Jan 01 '22 11:01 Amnell

Same error

sapar-io avatar Jan 06 '22 16:01 sapar-io

Were you able to solve this issue? Even in the demo preview, there is no padding. Is it possible to add padding between the popup and the edges of the screen?

Scott1803 avatar Jul 01 '22 13:07 Scott1803

In my local copy I'm using the following patch:

diff --git a/Sources/SlideOverCard/SlideOverCard.swift b/Sources/SlideOverCard/SlideOverCard.swift
index 772e279..8c597ee 100644
--- a/Sources/SlideOverCard/SlideOverCard.swift
+++ b/Sources/SlideOverCard/SlideOverCard.swift
@@ -54,6 +54,7 @@ public struct SlideOverCard<Content: View>: View {
                 Group {
                     if #available(iOS 14.0, *) {
                         container
+                            .padding(8)
                             .ignoresSafeArea(.container, edges: .bottom)
                     } else {
                         container

to make it look more like the "original".

You may want to check though whether the changes that have landed upstream earlier this month solve your problem as well by introducing inner- and outer padding options.

mickeyl avatar Sep 14 '22 18:09 mickeyl