Skip to content

Commit 038dc89

Browse files
committed
Add isVisible to StreamDeckSimulator (#1)
1 parent 7b02f04 commit 038dc89

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Example/Example App/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct ContentView: View {
3939
Label("3. Example - Animated", systemImage: "figure.stairs")
4040
}
4141
.tag(Example.animated)
42-
42+
4343
sessionStateView
4444
.tabItem {
4545
Label("4. Example - Device Specific", systemImage: "figure.dance")

Sources/StreamDeckSimulator/StreamDeckSimulator.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ public final class StreamDeckSimulator {
9191
return windowScene?.first { $0.activationState == .foregroundActive }
9292
}
9393

94+
/// Returns whether the Stream Deck simulator overlay is visible.
95+
public static var isVisible: Bool {
96+
!(shared.window?.isHidden ?? true)
97+
}
98+
9499
/// Shows a Stream Deck simulator overlay in the current scene.
95100
///
96101
/// The overlay is contained in a new UIWindow. You will still be able to interact with your application UI.

0 commit comments

Comments
 (0)