struct ContentView: View {
var body: some View {
Text("Hello, world!")
.padding()
.navigationTitle("Title")
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button {
} label: {
Label {
Text("Button Text")
} icon: {
Image("commonIcoClose")
.renderingMode(.template)
// .foregroundColor(.red)
.foregroundStyle(.red)
}
}
}
}
}
}
Above code should set Button's Image color to red but in Xcode15(15A240d), color is not applied and just set to default blue.
In iOS 15, 16 in Xcode 14.3.1 and iOS 15, 16 + Xcode15(15A240d) works fine(image's color is set to red).
So if i want to set color to red, I should use .tint
like below.
struct ContentView: View {
var body: some View {
Text("Hello, world!")
.padding()
.navigationTitle("Title")
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button {
} label: {
Label {
Text("Button Text")
} icon: {
Image("commonIcoClose")
.renderingMode(.template)
}
}
.tint(.red)
}
}
}
}
Is this change intended? Or is it a bug?