-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// AppTabNavigation.swift | ||
// Hydra | ||
// | ||
// Created by Ieben Smessaert on 07/11/2022. | ||
// Copyright © 2022 Zeus WPI. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct AppTabNavigation: View { | ||
|
||
enum Tab { | ||
case feed | ||
case resto | ||
} | ||
|
||
@State private var selection: Tab = .feed | ||
|
||
var body: some View { | ||
TabView(selection: $selection) { | ||
NavigationView { | ||
Overview() | ||
} | ||
.tabItem { | ||
let menuText = Text("Feed", comment: "Feed menu tab title") | ||
Label { | ||
menuText | ||
} icon: { | ||
Image(systemName: "doc.richtext") | ||
}.accessibility(label: menuText) | ||
} | ||
.tag(Tab.feed) | ||
|
||
NavigationView { | ||
RestoView() | ||
} | ||
.tabItem { | ||
let menuText = Text("Resto", comment: "Resto menu tab title") | ||
Label { | ||
menuText | ||
} icon: { | ||
Image(systemName: "fork.knife") | ||
}.accessibility(label: menuText) | ||
} | ||
.tag(Tab.resto) | ||
} | ||
} | ||
} | ||
|
||
struct AppTabNavigation_Previews: PreviewProvider { | ||
static var previews: some View { | ||
AppTabNavigation() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// RestoView.swift | ||
// Hydra | ||
// | ||
// Created by Ieben Smessaert on 08/11/2022. | ||
// Copyright © 2022 Zeus WPI. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct RestoView: View { | ||
var body: some View { | ||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) | ||
} | ||
} | ||
|
||
struct RestoView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
RestoView() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters