@EnvironmentObject Explained in SwiftUI | iOS 17
Вставка
- Опубліковано 22 сер 2024
- Confused about how @EnvironmentObject works? We've got you covered!
🔥Become a member for UNLIMITED ACCESS
www.stephancod...
🔥 iOS App Templates:
www.stephancod...
🔴@State vs @Binding video:
• NEVER Confuse @State v...
🔴@StateObject vs @ObservedObject video:
• DON'T Make this MISTAK...
🔴 FREE Threads Clone SwiftUI Course:
appstuff.teach...
🔴 FREE Instagram Course with SwiftUI:
• 🔴 Build Instagram With...
🔴Navigation Stacks:
• This NEW SwiftUI Featu...
🖥️ ONLINE COURSES & APPS
👉 Pro Courses:
www.stephancod...
👉 FREE UBER SwiftUI Course
• 🔴 Let's Build UBER wit...
👉 FREE Twitter SwiftUI Course
• 🔴 Let's Build Twitter ...
📺 Social Media:
Instagram - @stephan.dowless
Instagram - @appstuffllc
Good stuff! 👍 Can you make a video about @Observable / @Bindable and how can we use @Environment in iOS 17?
Exactly. EnvironmentObject is from iOS 13.
"uno mas tiempo " i love that jajajaj
Clear and concise! Thank you
Great watch!
Hello, thank you for the content you create. Could you make a video about application modularity? I would love to learn how to break down applications into modules, and I'd prefer to learn it from you.
where do you get your coffee from?
Starbucks
Thanks for the video. What if I have two View Models? One for using timers and other for playing sound.
As always best explanation. Actually, I am a diamond member on your website and I followed your networking masterclass which the course is awesome. There you didn’t use Environment object I wonder if you could explain us how to use environment object in that project because there you used protocol and service. It is kind of complicated for me to implement that project with Environment. And I would like to ask you that can we use multiple environment for multiple view model? Could you please explain that for us?
When UIKit videos are coming? Like building apps clone with UIKit instead of SwiftUI
UIKit is sinking so what's the point of making clones with an old framework?
@@iLoveAppl3947 Why not? SwiftUI is just sugar. Most of the companies/start-up still uses UIKIT instead of SwiftUI.
Sorry, in my country $40 is 1/4 of the monthly income 😂 Not a coffee budget.
Mine just says cannot find 'viewModel' in scope. Why is this environmentObject thing so freaking buggy. I have wasted hours trying to find an answer to this one stupid problem. It isn't seeing its own environmentObject that I'm supposed to use.
Fix: I had to pass the private thing as a object down to the subsections of code below the main code. Doesn't seem like much of a fix, cause if it is an "environment" variable, you'd think it would be available in the background environment, not so picky that it can't even see itself in the same exact Swift file. Jeez.
I build this and it runs fine in the simulator but crashes ever time on the canvas, all of my previous apps without using EnviromentObject run fine on the canvas. I have spent hours trying to find a type-o and can't figure it out. any suggestions?
Fixed as well, on mine I had to add the enviromentObject modifier to the previews of my views
but 1 viewModel for 1 view ..