Q:

How do I pin a view to the edges of a screen?

How do I pin a view (in this case, a label/text) to an edge of a screen with SwiftUI? With Storyboards I would just use AutoLayout but that isn't available with SwiftUI.

A:

You can do something like this
    VStack {
        HStack {
            Text("Label")
            Spacer()
        }
        Spacer()
    }

Spacer in VStack will make sure HStack is at the top, Spacer in HStack will make sure Text is all they way to the left. You can also solve this with alignments.

