Home SwiftUI How to create Stacks using Vstack in SwiftUI

How to create Stacks using Vstack in SwiftUI

by reevescode
150 views

What is the Vstack ?

The Vstack allows you arranges view children in the vertically.

Simple Example of Vstack

        VStack{
            Image("apple")
                .resizable()
                .scaledToFit()
           
            Text("Hello, world!")
                .font(.largeTitle)
                .fontWeight(.bold)
                .padding()
           
            Text("VSTACK")
                .font(.largeTitle)
                .fontWeight(.bold)
        }//VSTACK
        .padding()
        .border(.red, width: 4)


5/5 - (3 votes)

You may also like