diff --git a/Example/Example App/ContentView.swift b/Example/Example App/ContentView.swift index 8896a94..a8564e1 100644 --- a/Example/Example App/ContentView.swift +++ b/Example/Example App/ContentView.swift @@ -39,7 +39,7 @@ struct ContentView: View { Label("3. Example - Animated", systemImage: "figure.stairs") } .tag(Example.animated) - + sessionStateView .tabItem { Label("4. Example - Device Specific", systemImage: "figure.dance") diff --git a/Sources/StreamDeckSimulator/StreamDeckSimulator.swift b/Sources/StreamDeckSimulator/StreamDeckSimulator.swift index ed13a89..f192910 100644 --- a/Sources/StreamDeckSimulator/StreamDeckSimulator.swift +++ b/Sources/StreamDeckSimulator/StreamDeckSimulator.swift @@ -91,6 +91,11 @@ public final class StreamDeckSimulator { return windowScene?.first { $0.activationState == .foregroundActive } } + /// Returns whether the Stream Deck simulator overlay is visible. + public static var isVisible: Bool { + !(shared.window?.isHidden ?? true) + } + /// Shows a Stream Deck simulator overlay in the current scene. /// /// The overlay is contained in a new UIWindow. You will still be able to interact with your application UI.