Skip to content

Commit 8cb7b35

Browse files
authored
Use sidebarAdaptable (#87)
1 parent 8b87553 commit 8cb7b35

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Sources/Showcase/ContentView.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,18 @@ struct ContentView: View {
3232
Label("Settings", systemImage: "gearshape.fill")
3333
}
3434
}
35+
.tabViewStyle(tabViewStyle)
3536
.preferredColorScheme(appearance == "dark" ? .dark : appearance == "light" ? .light : nil)
3637
.statusBarHidden(statusBarHidden)
3738
}
39+
40+
var tabViewStyle: some TabViewStyle {
41+
if #available(iOS 18.0, *) {
42+
return .sidebarAdaptable
43+
} else {
44+
return .automatic
45+
}
46+
}
3847
}
3948

4049
#Preview {

0 commit comments

Comments
 (0)