I am trying to add space between the yellow toolbar and the MiniView element below. When I add space, it looks like it extends the toolbar.
The space needs to be similar to the space between the MiniView and List.
import SwiftUI
struct AnotherView: View {
var body: some View {
let words = ["Nakul", "Chawla"]
VStack {
VStack{
Text("lets see if this works")
}
.navigationTitle("Hawaii")
.toolbar {
Text("something else")
}
.toolbarBackground(.yellow, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.navigationBarTitleDisplayMode(.inline)
VStack {
Spacer()
MiniView()
Spacer()
Spacer()
Spacer()
List(words, id: \.self) { word in
Text(word)
}
}
}
}
}
EDIT: screenshot from another app to demonstrate what I want. Something like this but instead of the first list, I want a VStack where I can add some information.