Make A Vstack Fill The Width Of The Screen In

[Solved] Make A Vstack Fill The Width Of The Screen In | Swift - Code Explorer | yomemimo.com
Question : Make a VStack fill the width of the screen in SwiftUI

Answered by : mobile-star

 struct ContentView : View { var body: some View { VStack(alignment: .leading) { Text("Hello World") .font(.title) Text("Another") .font(.body) Spacer() } .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .topLeading) .background(Color.red) } }

Source : | Last Update : Thu, 05 Dec 19

Answers related to make a vstack fill the width of the screen in swiftui

Code Explorer Popular Question For Swift