I've discovered what I think is a bug in SwiftUI unless I'm doing something obviously wrong.
I have an Asset Catalogue configured with an image that has variants for "Any" width size class and "Regular" width size class.
When the Image is loaded with the following code:
struct ContentView: View {
var body: some View {
VStack {
Image("icon")
}
.padding()
}
}
when running on an iPad you would expect the image for the "Regular" width size class to be displayed. However, it seems that it is only ever the image for the "Any" width size class that is loaded.
Is this a known issue with Asset Catalogs and SwiftUI?