Skip to content

Commit

Permalink
UseTabView for tvOS in ContentView
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatStella7922 committed Nov 16, 2023
1 parent 859abfc commit ccae525
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions dcbattwebhook-swift/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ struct ContentView: View {

var body: some View {
VStack {
#if os(tvOS)
TabView {
HomeUIView()
.tabItem {
Label("Home", systemImage: "house")
}
SettingsView()
.tabItem {
Label("Settings", systemImage: "gearshape")
}
HelpView()
.tabItem {
Label("Help", systemImage: "questionmark.circle")
}
AboutView()
.tabItem {
Label("About", systemImage: "person.circle")
}
}
#else
NavigationView {
List() {
NavigationLink(destination: HomeUIView(), isActive: $isShowingHome, label: {
Expand Down Expand Up @@ -48,6 +68,7 @@ struct ContentView: View {
.padding()
#endif
}
#endif
}.onAppear() {
if defaults.bool(forKey: "IsFirstLaunch") == false {
DoAppFirstTimeLaunch()
Expand Down

0 comments on commit ccae525

Please sign in to comment.