2025-05-26 21:07:50 +07:00

69 lines
2.3 KiB
Swift

//
// SwiftUIView.swift
// UIKitComponents
//
// Created by User on 26.05.2025.
//
import SwiftUI
struct TabbarFullTest: View {
@State var selection: String = "Главная"
init(selection: String = "Главная") {
self.selection = selection
FontWeightSetUp.allFonts()
}
var body: some View {
VStack {
TabbarContainer(selection: .constant("Профиль")) {
Color.white
.tabItem(tab: "Главная", selection: $selection)
Color.blue
.tabItem(tab: "Каталог", selection: $selection)
Color.green
.tabItem(tab: "Проекты", selection: $selection)
Color.blue
.tabItem(tab: "Профиль", selection: $selection)
}
TabbarContainer(selection: .constant("Проекты")) {
Color.white
.tabItem(tab: "Главная", selection: $selection)
Color.blue
.tabItem(tab: "Каталог", selection: $selection)
Color.green
.tabItem(tab: "Проекты", selection: $selection)
Color.blue
.tabItem(tab: "Профиль", selection: $selection)
}
TabbarContainer(selection: .constant("Каталог")) {
Color.white
.tabItem(tab: "Главная", selection: $selection)
Color.blue
.tabItem(tab: "Каталог", selection: $selection)
Color.green
.tabItem(tab: "Проекты", selection: $selection)
Color.blue
.tabItem(tab: "Профиль", selection: $selection)
}
TabbarContainer(selection: .constant("Главная")) {
Color.white
.tabItem(tab: "Главная", selection: $selection)
Color.blue
.tabItem(tab: "Каталог", selection: $selection)
Color.green
.tabItem(tab: "Проекты", selection: $selection)
Color.blue
.tabItem(tab: "Профиль", selection: $selection)
}
}
}
}
#Preview {
TabbarFullTest()
}