The following sample code illustrates an issue I am having with my SwiftUI app:
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationView {
Text("Hello, world!")
.toolbar {
ToolbarItem {
Button {
print("house")
} label: { Image(systemName: "house") }
}
ToolbarItem {
Button {
print("bookmark")
} label: { Image(systemName: "bookmark") }
}
}
} //NavigationView
} //body
}
When I run this on an iPhone 13 simulator running iOS 16+, it works fine. But, on an iPhone 13 simulator running iOS 15.0, only the first toolbar button appears -- the "bookmark" button does not appear. I would appreciate any suggestions as to what I'm missing!