struct ContentView: View {
var body: some View {
TabView{
NavigationStack{
List{
Text("Hello, World")
.badge("New Items!")
Text("Hello, World")
Text("Hello, World")
Text("Hello, World")
}.padding()
}
.tabItem {
Image(systemName: "heart.fill")
Text("hello")
}
.badge(5)
Color.red.opacity(0.1)
.tabItem {
Image(systemName: "heart.fill")
Text("hello")
}.badge("Press Like")
Color.orange.opacity(0.1)
.tabItem {
Image(systemName: "heart.fill")
Text("hello")
}
}
}
}
SwiftUI_visionOS_Note
.badge
0 min read
Subscribe to our newsletter
Get the latest news and updates from our team