Answers for "VStack spaing"

1

remove padding hstack swiftui

VStack(alignment: .leading) {
                Text("How to enjoy your life without money").bold().font(.system(size: 20))
                HStack (alignment: .center, spacing: 0, content: {
                    Text("Lets create")
                    Text("3K views")
                    Text("3 hours ago")
                })
            }
Posted by: Guest on March-13-2020
0

Make a VStack fill the width of the screen in SwiftUI

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)
        }
    }
Posted by: Guest on November-28-2019

Code answers related to "Swift"

Browse Popular Code Answers by Language