1 year ago
#284437
rayx
SwiftUI: SF symbol in tab item is automatically filled
I notice that tabItem() automatically uses the "fill" version of the SF symbol inside it. See example below. Does anyone know how to show the "non-fill" version of SF symbol in tab item?
struct ContentView: View {
@State var data = Data()
var body: some View {
TabView {
Label("Account", systemImage: "dollarsign.square")
.tabItem {
Label("Account", systemImage: "dollarsign.square")
}
Label("Issues", systemImage: "exclamationmark.triangle")
.tabItem {
Label("Issues", systemImage: "exclamationmark.triangle")
}
}
}
}
In the above example, I specify "dollarsign.square" and "exclamationmark.triangle" SF symbols, but the actual symbols shown in the tab items are "dollarsign.square.fill" and "exclamationmark.triangle.fill", respectively.
swiftui
tabitem
sf-symbols
0 Answers
Your Answer