TabBar Item
A modal representing an individual item for the tab bar.
Overview
Initializer
TabBarItem(systemImage: String, titleKey: String)Parameters
Paramters
Description
Example
@State private var selection = TabBarItem(systemImage: "house.fill", titleKey: "Home")
var body: some View {
TabBar(selection: $selection) {
Text("Home View")
.tabBarItem(systemImage: "house.fill", titleKey: "Home", selection: $selection)
Text("Settings")
.tabBarItem(systemImage: "gear", titleKey: "Settings", selection: $selection)
}
}Last updated