-
-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
Description
Not working while we defining scenePhase in the App File.
Current Behavior
It shows the blank screen only.
Code Sample
`import SwiftUI
import MijickPopups
@main
struct PopupsDemoApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@Environment(\.scenePhase) private var scenePhase
@StateObject private var appManager = AppManager()
var body: some Scene { WindowGroup {
ContentView().registerPopups() { $0
.center {
$0.backgroundColor(.backgroundSecondary)
.cornerRadius(20)
.popupHorizontalPadding(20)
}
.vertical {
$0.backgroundColor(.backgroundSecondary)
.cornerRadius(20)
.enableStacking(true)
.tapOutsideToDismissPopup(true)
}
}
.environmentObject(self.appManager)
}}
}
struct ContentView: View {
@EnvironmentObject private var appManager: AppManager
var body: some View {
VStack {
Button {
Task {
await ToastView(description: "Description will be here").dismissAfter(2).present()
}
} label: {
Text("Show Popup")
}
}
.padding()
}
}`
Screenshots
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
| Name | Version |
|---|---|
| SDK | e.g. 4.0.1 |
| Xcode | e.g. 16.3 |
| Operating System | e.g. iOS 18.4 |
| Device | e.g. iPhone 16 |
Reactions are currently unavailable
