Description
You've made it to the final lesson of Module 1. Let's finish your first working SwiftUI app.
🚨 Special Offer for CWC+ https://cwc.to/yt-27-offer
In this lesson, you'll learn conditional logic using Swift if, else if and else statements, comparison operators, and then apply those concepts to check whether the user selected the correct answer in our Quiz App.
By the end of this lesson, you'll have built a working single-screen iPhone app from scratch using Swift and SwiftUI.
But this is intentionally the simplest version of the app.
In the complete iOS Foundations course, we take this exact Quiz App and continue evolving it.
In Module 2, you'll learn separation of concerns, Models, ViewModels, services, MVVM, observable state and data flow.
In Module 3, we'll turn the app into a multi-screen experience with multiple quizzes, reusable views, navigation, tabs, different question types and bindings.
In Module 4, we'll move the quiz content out of the Swift code and load it from JSON, preparing you for concepts like networking and databases.
The goal is for you to see the same app evolve from a very simple beginner project into something much closer to the way you'd structure a real app.
🚨 Special Offer for CWC+: https://cwc.to/yt-27-offer
📦 Get the free Module 1 resources: https://codewithchris.com/foundations-m1/
🚀 Continue building this exact app in the complete iOS Foundations course:
https://cwc.to/foundations27
▶ Watch or revisit the complete free Module 1 playlist:
https://www.youtube.com/playlist?list=PLUiEVrjEWTLw
0:00 Intro
0:17 Conditional logic in Swift
1:41 True/false boolean conditions
2:15 Comparison operators
4:13 Else if and else
4:46 How the if/else chain works
5:21 First true condition wins
6:17 Omitting parentheses
6:49 Quiz app recap
7:25 Implementing the answer check
8:15 Testing the app
9:00 Styling buttons
10:48 App complete & what's next
11:09 Module 2: MVVM architecture
11:41 Module 3: Multi-screen navigation
11:46 Module 4: JSON data
12:34 Congratulations & wrap up
