Skip to content

Commit 8e4faf7

Browse files
committed
Ignore safe area in UIHostingController. Fixes #142.
1 parent ffde0ba commit 8e4faf7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

JDStatusBarNotification/Public/NotificationPresenter.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public class NotificationPresenter: NSObject, NotificationWindowDelegate {
183183
{
184184
let controller = UIHostingController(rootView: viewBuilder())
185185
controller.view.backgroundColor = .clear
186+
if #available(iOS 16.4, *) {
187+
controller.safeAreaRegions = SafeAreaRegions()
188+
}
186189
return presentCustomView(controller.view,
187190
sizingController: HostingControllerSizingController(for: controller),
188191
styleName: styleName,

0 commit comments

Comments
 (0)