Skip to content

Commit 8b87553

Browse files
authored
Status bar hiding (#86)
1 parent a4569f6 commit 8b87553

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Sources/Showcase/ContentView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ enum ContentTab: String, Hashable {
88
struct ContentView: View {
99
@AppStorage("tab") var tab = ContentTab.about
1010
@AppStorage("appearance") var appearance = ""
11+
@AppStorage("statusBarHidden") var statusBarHidden = false
1112

1213
var body: some View {
1314
TabView(selection: $tab) {
@@ -32,6 +33,7 @@ struct ContentView: View {
3233
}
3334
}
3435
.preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil)
36+
.statusBarHidden(statusBarHidden)
3537
}
3638
}
3739

Sources/Showcase/SettingsView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import SkipMarketplace
55

66
struct SettingsView: View {
77
@Binding var appearance: String
8+
@AppStorage("statusBarHidden") var statusBarHidden = false
89

910
var body: some View {
1011
NavigationStack {
@@ -14,6 +15,7 @@ struct SettingsView: View {
1415
Text("Light").tag("light")
1516
Text("Dark").tag("dark")
1617
}
18+
Toggle("Hide status bar", isOn: $statusBarHidden)
1719
NavigationLink("Bill of Materials") {
1820
SBOMView(bundle: .module)
1921
}

0 commit comments

Comments
 (0)