I have these frames positioned on my view, exactly how I need buttons placed but am new to swift - UI and trying to figure out how to do this the right way. Can I somehow bring the button onto the stack above the background color of the VStack? Also is VStack the correct way to approach this?
Code for reference :
//Todays List
VStack(alignment: .leading) {
Color.black
.frame(width: 205, height: 70, alignment: .center)
.position(x: 80, y: 80)
}
//Tomorrows List
VStack(alignment: .leading) {
Color.black
.frame(width: 205, height: 70, alignment: .center)
.position(x: 290, y: 80)
}
//This Month
VStack(alignment: .leading) {
Color.blue
.frame(width: 205, height: 70, alignment: .center)
.position(x: 80, y: 150)
}
//Next Month
VStack(alignment: .leading) {
Color.blue
.frame(width: 205, height: 70, alignment: .center)
.position(x: 290, y: 150)
}
//3% Yeild Or Higher
VStack(alignment: .leading) {
Color.red
.frame(width: 205, height: 70, alignment: .center)
.position(x: 80, y: 215)
}
//5% Yield Or Higher
VStack(alignment: .leading) {
Color.red
.frame(width: 205, height: 70, alignment: .center)
.position(x: 290, y: 215)
}
//App Help
VStack(alignment: .leading) {
Color.green
.frame(width: 205, height: 70, alignment: .center)
.position(x: 80, y: 285)
}
//Exit App / TBD
VStack(alignment: .leading) {
Color.yellow
.frame(width: 205, height: 70, alignment: .center)
.position(x: 290, y: 285)
}
}
[1]: https://i.stack.imgur.com/Fe64N.png