How I learned SwiftUI from scratch and launched an app to App Store in less than a month.

Samuel
2 min readJul 30, 2022

--

Two best ways to learn almost anything are

  1. Teach it to someone else
  2. Start using it

Summary

I spent less than a month learning SwiftUI and launched a pomodoro App “Focus Town — Stay Focused” to app store and here’s how it happened.

Learning the basic of SwiftUI

You don’t need be an expert in certain skill before you can start applying it. I sincerly believe the 80–20 rules also applies to programming. That is, 80% of the app code is built with the same 20% knowledge. And here are the 20% SwiftUI building blocks that are enough to get started. For the remaining 80%, I try learning them when I run into a situation that requires it.

Generic UI Layout

  1. ZStack{ .. }
  2. HStack{..}
  3. VStack{..}

Generic Components

  1. Text()
  2. Image()
  3. Button()
  4. Spacer()
  5. List()

Generic Modifiers

  1. padding()
  2. foregroundColor()
  3. backgroundColor()
  4. font()

State Management keywords

  1. @State private var state
  2. @Binding private var binding

A simple idea and just do it!

Once I learned the above, I have all the tools required to start building app. Next step is to come up with an idea. I wanted a pomodoro timer that looks calming and have some sense of progression. And before my brain has a chance to complain it’s too dificult or time consuming, just do it

--

--