UIKit view controllers wrapped in UIViewControllerRepresentable views to use in SwiftUI have safe area insets added to them. This can create extra, unwanted padding (most notably in landscape) for those views. The most straightforward way I found to deal with this is to add .ignoresSafeArea() to the view in the SwiftUI layout.
Affected views:
[ ] Settings (SettingsView)
[ ] In-Person Payments (InPersonPaymentsMenu) — not as noticeable, aside from the scrollbar.
[ ] Reviews list (ReviewsView)
[ ] Feedback survey (Survey)
[ ] Share sheet/popover (ShareSheet) — used in coupon details, application log, simple payments.
Describe the bug
UIKit view controllers wrapped in UIViewControllerRepresentable views to use in SwiftUI have safe area insets added to them. This can create extra, unwanted padding (most notably in landscape) for those views. The most straightforward way I found to deal with this is to add
.ignoresSafeArea()
to the view in the SwiftUI layout.Affected views:
SettingsView
)InPersonPaymentsMenu
) — not as noticeable, aside from the scrollbar.ReviewsView
)Survey
)ShareSheet
) — used in coupon details, application log, simple payments.Settings
In-Person Payments
Reviews
Survey
Share Sheet