In this lesson I want to review with you how data both plays a part in your view and also how it flows through your app across multiple views.
We’ll start with the simplest scenario and work our way to more complex scenarios.
You’ll see examples using state properties, bindings, observable objects, environment objects as well as other data related SwiftUI keywords such as @Published, @ObservedObject and more.
By the end, you’ll know how to pass data around in your SwiftUI app!
🚨 SPECIAL CWC+ OFFER FOR YOUTUBE:
[ Ссылка ]
Timestamps:
00:00 Introduction
00:57 SwiftUI State Properties
03:20 State Properties Recap
03:38 SwiftUI Bindings
04:10 $Binding Example
06:51 $Bindings Recap
07:05 @Binding Example
14:42 $Binding and @Binding Recap
15:15 SwiftUI State and Bindings Recap
15:45 SwiftUI ObservableObjects
17:31 ObservableObject Example
22:55 ObservableObject Recap
26:33 SwiftUI EnvironmentObject
28:07 EnvironmentObject Example
30:28 EnvironmentObject Recap
32:39 Outro
MY FREE ONLINE COURSE:
⚡ How to make an app in 14 days - [ Ссылка ]
CWC+ PROGRAM:
👩💻 All our courses in a learning path - [ Ссылка ]
WEEKLY UPDATES VIA EMAIL:
✉️ Every Saturday, receive an email digest of new content - [ Ссылка ]
CONNECT:
🌍 Website - [ Ссылка ]
😺 GitHub - [ Ссылка ]
📸 Instagram - [ Ссылка ]
🐦 Twitter - [ Ссылка ]
ABOUT CODEWITHCHRIS:
Hi I’m Chris! I’m dedicated to teaching fundamentals about how to make an app. This is important if you’re trying to land an iOS job, be a freelancer, increase or start a business with an app idea. On this channel and my website, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have learned to code and build apps on their own! [ Ссылка ]
DID THESE LESSONS HELP YOU?
Please let me know! - [ Ссылка ]
ROADMAP:
[ Ссылка ]
Data Flow in a SwiftUI App
Теги
swiftui data flowpassing datastate propertystate objectbindingenvironment objectswiftui state vs stateobjectswiftui data modelswiftui bindingswiftui environmentobjectswiftui data bindingswiftui observedobjectswiftui observedobject exampleswiftui observedobject bindingswiftui observedobject vs stateobjectswiftui observedobject vs bindingpass parameterswiftui pass dataswiftuiapp developmentios