fitness_app/FitnessApp/FitnessTabView.swift
Matt Bruce 9b0287f038 initial start screen
Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
2024-12-20 13:19:36 -06:00

43 lines
1.0 KiB
Swift

//
// FitnessTabView.swift
// FitnessApp
//
// Created by Matt Bruce on 12/20/24.
//
import SwiftUI
struct FitnessTabView: View {
@State var selectedTab = "Home"
init() {
let appearace = UITabBarAppearance()
appearace.configureWithOpaqueBackground()
appearace.stackedLayoutAppearance.selected.iconColor = .green
appearace.stackedLayoutAppearance.selected.titleTextAttributes =
[.foregroundColor: UIColor.label]
UITabBar.appearance().scrollEdgeAppearance = appearace
}
var body: some View {
TabView(selection: $selectedTab) {
HomeView()
.tag("Home")
.tabItem {
Image(systemName: "house")
Text("Home")
}
HistoricDataView()
.tag("Historic")
.tabItem {
Image(systemName: "chart.line.uptrend.xyaxis")
Text("Historic")
}
}
}
}
#Preview {
FitnessTabView()
}