brand
cover

Learn the basics of SwiftUI

heart
dot

Grey Esteban

yhancogrey@gmail.com

Step 1

Create a new iOS App project in Xcode

Step 2

Replace the contents of ContentView.swift except the import with this one.

From here we could already learn a lot of things:

A. You can stack elements horizontally by just placing them inside an HStack

B. The Rectangle and Text colors automatically adapt to Light Mode and Dark Mode

C. Rectangle by default occupies all the available space

D. They don't occupy the notch and the bottom chin. These are regions where they might be obscured.

Step 3

Replace HStack with VStack. Now, the elements align vertically.

Step 4

Add a frame modifier to Rectangle to set its size.

Step 5

Add a foregroundColor modifier to Rectangle to set its color

Get access to platform guides!

Join waitlist and get a free guide.

A community of developers showcasing their work, publishing tutorials and putting their name on the map.

devluvs@highoutput.io

© 2022 High Output Ventures, All rights reserved