I've been experimenting with SwiftUI and couldn't figure out how to get a simple UIToolbar to appear at the bottom of the screen.
Basic view:
struct MyView : View {
var body: some View {
NavigationView {
List {
NavigationButton(destination: Text("1")) {
Text("Element 1")
}
// ...
}.navigationBarTitle(Text("Elements"))
}
}
}
Revisited this with Xcode 11 beta 3 and it seems that the following works:
var body: some View {
NavigationView {
VStack {
List(model.items) { item in
ItemViewRow(item: item)
}
HStack {
Button(action: {
}) {
Image(systemName: "someimage")
}
Spacer()
Button(action: {
}) {
Image(systemName: "someimage")
}
}.padding()
}
.navigationBarTitle(Text("Items"))
}
}
I'll probably have to change the "toolbar"'s background color to behave properly but it looks similar to a good old UIToolbar.