Position view bottom without using a spacer

前端 未结 3 1088
长发绾君心
长发绾君心 2020-12-19 19:40

How can I position a View at the bottom without using a spacer. I know I can achieve it placing a spacer and my view in inside a VStack but I don\'t want to use a spacer bec

3条回答
  •  情深已故
    2020-12-19 20:15

    Position property will help you try this way

    Group{ // container View
         Text("iner label")
    }.position(x: UIScreen.main.bounds.width/2, y: UIScreen.main.bounds.height-50)
    

提交回复
热议问题