SwiftUI tabItem内もLabelで良い

以前はImage+Textで記載していた。

TabView(selection: $selection) {
    CalendarView()
        .tabItem {
            Label("Calendar", systemImage: "calendar")
        }
        .tag(0)
    NextEventView()
        .tabItem {
            Label("Next Event", systemImage: "deskclock")
        }
        .tag(1)
    SettingView()
        .tabItem {
            Label("Setting", systemImage: "gear")
        }
        .tag(2)
}

SwiftSwift,SwiftUI

Posted by shi-n