Padding alone will give you decent spacing between your views. If you keep the edge and length parameters nil, the system will calculate the amount of space applied to all the edges.
Code result — padding
Spacer
adds flexible spacing that expands along its container’s axis. Inside HStack, the spacing will be horizontal. Inside VStack, it will be vertical. If the Spacer
is not contained in a stack, then the system will add spacing to both axes.
#swiftui #swift #programming #mobile #ios