Hello everyone,
I've been having a bit of trouble with the .symbolRenderingMode(_:) modifier.
When trying to apply it to a single button in a toolbar, it does not work at all. The symbol is always rendered as monochrome.
However, I've realised that with this little hack I can achieve the expected results, but this is not ideal.
.toolbar {
HStack {
Button("", action: {}) // The hack
Button("Button", systemImage: "line.3.horizontal.decrease.circle.fill", action: {})
.symbolRenderingMode(.hierarchical)
.foregroundStyle(.blue)
}
}
I've submitted a bug report (FB16129223) but in the meantime, is this my only solution ?
Side note: the foregroundStyle(_:) modifier is ignored as well.
Post
Replies
Boosts
Views
Activity
Since the first beta of Xcode 16, randomly when editing a SwiftUI view a crash report opens with the message "PreviewShell quit unexpectedly."
After that, annoyingly often the canvas fails to reload correctly, and shows this broken thing:
The only way to get it working again is to restart Xcode, but it happens so often that it really impacts productivity.
Does this happen to anyone else? If so, have you found a solution?
I've already filed a report (FB14876223)