How do I get the multicolor symbol for Image and UIImage?

At 15:55 in the session, how to display the multicolor version of the symbol was shown for NSImage.

But how can I display a multicolor symbol using SwiftUI's Image or UIKit's UIImage?

Replies

Unfortunately, iOS doesn't support multi color symbols at this point. This also includes Mac Catalyst, since that's using UIKit APIs.
This works...at least in most cases, e.g. only some symbol will work with .font(.largeTitle). I think it's not yet fully implemented.

Code Block swift
struct SFSymbols2V: View {
let symbols: [String] = ["sun.max.fill",
"sunrise.fill",
"cloud.sun.rain.fill",
"cloud.heavyrain.fill",
"thermometer.sun.fill",
"thermometer.snowflake",
"exclamationmark.triangle.fill",
"star.fill","pencil.tip.crop.circle.badge.plus"]
var body: some View {
List{
ForEach(symbols, id: \.self){ symbol in
Image(systemName: symbol)
.renderingMode(.original)
.padding(.all, 10)
}
.background(Color.gray)
}
}
}


This SwiftUI iOS app allows you to browse the SF Symbols to discover what is or isn't working yet.
https://github.com/atrinh0/sfsymbols