Menu
Coddy logo textTech
swift iconPart of the Swift JourneyNewJourney

Learn SwiftUI

A free, interactive SwiftUI course. Write real SwiftUI code in every lesson, watch the screen it builds in a live phone preview, and tap it to see your state change. No Mac or Xcode needed, AI hints when you get stuck, and a free certificate when you finish.

4,075+ codders enrolled

50 lessons46 challenges106 quiz questions

  • Beginner friendly
  • sparkles iconAI-assisted coding help
  • hint iconHands-on interactive lessons
  • volume On iconAudio narration on every lesson
  • quiz iconQuizzes to test your knowledge
  • certificate iconFree certificate of completion

Syllabus

1 sections1 projects50 lessons46 challenges106 quiz questions

This section is part of the Swift Journey. The full syllabus has more sections - click any preview below to view it on the Journey page.

  1. Section 1Fundamentals86 lessons
  2. Section 2Logic & Flow56 lessons
  3. Start sectionStartExpandCollapseBuild app screens in Swift with SwiftUI: views and modifiers, stacks and layout, state and buttons, text fields and toggles, lists, navigation and shared data. Every lesson is real SwiftUI code, previewed live.

    Introduction

    2 lessons28

    Showing Content

    6 lessons615

    Stacks & Layout

    5 lessons512

    Modifiers

    5 lessons512

    State & Buttons

    5 lessons512

    User Input

    5 lessons512

    Lists

    5 lessons512

    Navigation

    5 lessons512

    Sharing Data

    4 lessons49

    Project - Coddy Coffee

    Project5 lessons12

    Final Challenges

    3 lessons3
What you get
Everything you'll use to learn to code

Learn by Doing

Write real code, query databases, build websites, and master AI prompts. Our interactive lessons cover every skill modern developers need.

playground.js
Code Editor
1const greeting = "Hello, Coddy!"
2function sayHi(name) {
3    return greeting + " " + name
4}
5
bottombar Collapse icon
Test #1test Case Success icon
Test #2test Case Success icon
Test #3test Case Failure icon
Input
"Alex"
Output
"Hello, Coddy! Alex"

Build Your Streak

Stay consistent and watch your progress grow! Track your daily coding habit, protect your streak with freeze days, and earn rewards for showing up every day.

12 days streak

Return tomorrow to keep your streak!

fire Filled icon
left icon

January 2026

right icon

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

21

22

23

24

25

26

27

28

29

30

product Double Or Nothing icon

Double or Nothing

Day 5 of 7

fire Freeze icon

Streak Freeze

2 left

Code Anywhere

Take your coding journey on the go! No setup, no downloads - just open and start coding. Available on iOS, Android and Web with 4.9 star ratings.

Python
7Streak
250Score
5Energy
Variables
journey Hex Done Base iconjourney Hex Done Shadow iconjourney Hex Done Top iconjourney Lesson Done icon
journey Path Right Done icon
journey Hex Done Base iconjourney Hex Done Shadow iconjourney Hex Done Top iconjourney Lesson Done icon
journey Path Left Done icon
journey Hex Active Base iconjourney Hex Active Shadow iconjourney Hex Active Top iconjourney Lesson Theory Challenge icon
CONTINUE
journey Path Right icon
journey Hex Locked Base iconjourney Hex Locked Shadow iconjourney Hex Locked Top iconjourney Lesson Theory Challenge icon
journey Path Left icon
journey Hex Locked Base iconjourney Hex Locked Shadow iconjourney Hex Locked Top iconjourney Lesson All icon
Journey
Goals
Leaderboard
Profile
4.9
StarStarStarStarStar
Rating

You're Not Alone

Compete on global leaderboards, invite friends to earn rewards, and celebrate each other's wins. Coding is better with friends!

Challenger League
Challenger LeagueTop 7 advance
leaderboard First icon1
avatar 1 icon
fire Filled icon
Alex7+ Days
2840
leaderboard Second icon2
avatar 2 icon
fire Filled icon
Jordan7+ Days
2650
leaderboard Third icon3
avatar 3 icon
fire Filled icon
Sam7+ Days
2420
4
avatar 4 icon
Casey
2180
5
avatar placeholder icon
fire Filled icon
Morgan7+ Days
1950
leaderboard Arrow Up iconPromotion zoneleaderboard Arrow Up icon

Every way to learn

Read, listen, test yourself, ask the AI, or look up anything you've already covered. Every lesson meets you where you are.

Intro to Variables
Audio

A variable is a named container that stores a value you can reference later in your program.

In Python, you create one by writing the name, an equals sign, then the value you want to store.

The value can change over time - reassigning the name simply points it to a new value.

1xSarah

Earn a Certificate

Earn certificates for every course you complete. Add them to your LinkedIn profile and resume to showcase your coding expertise to employers.

CoddyCertificate of Completion
This certifies thatJohn Doehas successfully completed
python iconPython Fundamentals
Verified
DateJan 2026
LinkedInAdd to LinkedIn

Why learn SwiftUI with Coddy

  • Build iPhone app screens in your browser. No Mac, no Xcode and no simulator to set up: your code compiles on our servers and the preview shows the screen it describes, so you can learn SwiftUI on Windows, Linux or a Chromebook.
  • The SwiftUI you use on every screen: text, fonts, colors and SF Symbols, stacks, alignment and Spacer, the modifier chain and why its order matters, buttons and @State, text fields, toggles, sliders and pickers, ForEach and List, NavigationStack, sheets and alerts, then @Binding and observable objects to share data between views.
  • A live, tappable preview. Tap a button or toggle a switch in the preview and the view redraws with its new state, so you see how declarative UI works instead of reading about it. You can switch to a phone frame and save a screenshot of what you built.
  • Small apps along the way, from a price tag and a weather card to a score keeper, a shopping list and a plant guide, then a multi-screen coffee ordering app as the final project and a free SwiftUI certificate when you finish the section.

Frequently asked questions about learning SwiftUI

What is SwiftUI?

SwiftUI is Apple's framework for building app interfaces in Swift. Instead of placing and updating each element by hand, you describe what the screen should show for the current data, and SwiftUI draws it and redraws it whenever that data changes. A screen is made of views, small structs with a body, that you combine with stacks and style with modifiers. The same code builds interfaces for iPhone, iPad, Mac, Apple Watch, Apple TV and Vision Pro.

Do I need a Mac or Xcode to learn SwiftUI here?

No. Every lesson runs in your browser: your code compiles on our servers and the preview next to the editor shows the screen it builds, so Windows, Linux and Chromebooks work fine. To run your app on a real iPhone or publish it to the App Store you will eventually need a Mac with Xcode, and everything you learn here carries straight over.

Is the preview the same as Xcode's?

It plays the same role, but it is not the iOS simulator. The preview is rendered by Coddy's own implementation of the SwiftUI views the course teaches, from the same run that grades your lesson, so what you see is exactly what the tests check. Taps on buttons, toggles and links are replayed against your code, so @State changes show up as they would in an app. It covers the views and modifiers in the lessons, not the whole SwiftUI framework, so treat it as a place to learn rather than a replacement for Xcode.

Should I learn Swift before SwiftUI?

Yes, the basics at least. SwiftUI is Swift code: views are structs, @State wraps a property, lists loop over arrays, and the compiler's type errors are Swift errors. This section comes right after the Fundamentals section of the Swift journey, which covers variables, types, functions, structs and optionals, so if Swift is new to you, start there.

SwiftUI vs UIKit: which should I learn?

Start with SwiftUI. It is Apple's recommended way to build new interfaces, it needs far less code for the same screen, and most new tutorials, sample code and Apple sessions use it. UIKit is the older framework behind many existing apps, so you may meet it in a job, but SwiftUI and UIKit work together in one app, and SwiftUI is the easier first step.

Is SwiftUI hard to learn?

The basics come quickly: a few lines put text, images and buttons on screen, and the preview shows the result of every edit. What takes practice is thinking in state, where you change the data and let the view redraw rather than changing the view yourself. That is why the section builds from @State to @Binding to observable objects one step at a time, with a small app at the end of each chapter.

Can I learn SwiftUI online for free?

Yes. The interactive SwiftUI section is free: full lessons, hands-on coding in every exercise, the live preview, a final project and a certificate. There is nothing to install and no Apple developer account to create before you start.

Do I get a certificate after the SwiftUI course?

Yes. Finishing the section gives you a free SwiftUI certificate of completion you can share on LinkedIn or add to your resume. It is not an Apple certification, but paired with the apps you build along the way it is a useful signal when you apply for iOS developer roles.
Coddy programming languages illustration

Learn Introduction to SwiftUI with Coddy

GET STARTED