@EnvironmentObject Explained in SwiftUI | iOS 17

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 19

  • @_Astr_
    @_Astr_ Рік тому +11

    Good stuff! 👍 Can you make a video about @Observable / @Bindable and how can we use @Environment in iOS 17?

    • @stuffeh
      @stuffeh 2 місяці тому

      Exactly. EnvironmentObject is from iOS 13.

  • @elduverx
    @elduverx Рік тому +2

    "uno mas tiempo " i love that jajajaj

  • @sergiocaplan1168
    @sergiocaplan1168 7 місяців тому

    Clear and concise! Thank you

  • @АлексейБалухтин-ж4п

    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.

  • @filipp7236
    @filipp7236 8 місяців тому

    Thanks for the video. What if I have two View Models? One for using timers and other for playing sound.

  • @Dragonboh1
    @Dragonboh1 2 місяці тому

    keep doing what you doing

  • @faiazrahman1470
    @faiazrahman1470 5 місяців тому

    Great watch!

  • @rahmonali7
    @rahmonali7 Рік тому

    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?

  • @BradCaldwellAuburn
    @BradCaldwellAuburn Рік тому +1

    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.

    • @kennethcoker4663
      @kennethcoker4663 11 місяців тому

      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?

    • @kennethcoker4663
      @kennethcoker4663 11 місяців тому

      Fixed as well, on mine I had to add the enviromentObject modifier to the previews of my views

  • @oscarmartinez-pc1nj
    @oscarmartinez-pc1nj 8 місяців тому +1

    where do you get your coffee from?

  • @phat80
    @phat80 8 місяців тому

    Sorry, in my country $40 is 1/4 of the monthly income 😂 Not a coffee budget.

  • @xtu373
    @xtu373 Рік тому +1

    When UIKit videos are coming? Like building apps clone with UIKit instead of SwiftUI

    • @Spacer-l3j
      @Spacer-l3j 8 місяців тому

      UIKit is sinking so what's the point of making clones with an old framework?

    • @xtu373
      @xtu373 8 місяців тому

      @@Spacer-l3j Why not? SwiftUI is just sugar. Most of the companies/start-up still uses UIKIT instead of SwiftUI.

  • @WeLoveYouFREEZbY
    @WeLoveYouFREEZbY 6 місяців тому +1

    but 1 viewModel for 1 view ..