I have a TabView that shall show a .tabItem with a custom image (not an Image(systemName:)):
@ObservedObject var model: MaintainAreaSelectionModel = MaintainAreaSelectionModel()
...
var body: some View {
VStack {
Image("Timeline")
TabView(selection: $model.lastSelectedMaintainAreaIndex) {
SomeView()
.tabItem({
Image("Timeline")
Text("Title")
})
.tag(0)
}
}
}
...
While the first Image shows the icon correctly, the second Image just shows a gray circle.
The image is part of the Assets catalog, I tried it with PDF vector images as well as with dedicated Bitmaps for all sizes (according to Apple's HIG) - no difference, always gray.
Any idea what's happening here? Are there perhaps any undocumented constraints that the image must fulfill to work as tabItem?
