SwiftUI tutorial for Beginners - @State vs @Binding - How to pass data between views?

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

КОМЕНТАРІ • 32

  • @AmineCch2t
    @AmineCch2t 2 роки тому

    Hi from Morocco, thank you for all your tutorials, I found the helpful.

  • @ekinyil
    @ekinyil 2 роки тому +1

    better than bootcamps and pricey courses, amazing.. thank you

  • @VlasiosSokorelosTheDarkwavist

    Thank you very much for the video and the explanation between the different ways to pass data between views !

  • @CraigTemple
    @CraigTemple 3 роки тому +2

    Terrific work! Thanks for taking the time to share. 🙏

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

    Well crafted tutorial, Thanks!

  • @katesychenko
    @katesychenko 2 роки тому

    Thank you for the video! Loud and clear :)

  • @theocrevon6374
    @theocrevon6374 3 роки тому

    You had me at the kitten pictures! I really enjoy your videos, keep them coming, great work!!

  • @MrMys7ical
    @MrMys7ical 3 роки тому +1

    Your videos are always on point. Amazing work!

    • @prettygirl6146
      @prettygirl6146 2 роки тому

      on point? lol, she does all the other stuff and missing out the main thing we have to skip skip skip skip forever until we actually see she's using the binding

  • @antonsergeyev2624
    @antonsergeyev2624 3 роки тому

    Karin, thanks you so much for your efforts. You are doing such a great job!

  • @kenjyfukuda
    @kenjyfukuda 3 роки тому

    Thanks for your video tutorial. Your explanation as well as example code is very clear and to the point.

  • @devjulianschmid
    @devjulianschmid 2 роки тому +1

    Great Video as always, but is it possible to get your Scribble proppertyWrapper.jpg ?? Would be really helpful to decide what Wrapper you should use. Danke :)

  • @Mitglied99
    @Mitglied99 3 роки тому

    Thanks!
    Great videos! looking forward to more :)
    greetings from mainz

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

    Thank you

  • @moshikof7778
    @moshikof7778 2 роки тому

    thanks for the video, can you please provide the documents that helped you to understand it ?

  • @LocNguyen-kk7dp
    @LocNguyen-kk7dp 3 роки тому

    awesome. can you create example more for StateObject and ObservedObject. Thank you

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

    I'm wondering about calling methods from within subviews, especially in an MVVM context. Let's say that the slider also needed to call some function on the PhotoEditorViewModel. Would you pass in the viewmodel and then call it from within the subview like: vm.someMethod() ?

  • @g3dr0cht
    @g3dr0cht 10 місяців тому

    i dont understand why there is no initializer in the struct you created

  • @oleksandrpronin414
    @oleksandrpronin414 2 роки тому

    At 1:01 of the video you said I could find pictures of the video in the description. I can't find them. Is there any way you can help with that?

    • @SwiftyPlace
      @SwiftyPlace  2 роки тому

      Sorry you are right. I forgot to link the picture. The link is here github.com/gahntpo/swiftui-property-wrapper

  • @rapier64
    @rapier64 3 роки тому

    Hi Karin! Do you provide courses at Udemy, as well?

  • @eskandarmounif
    @eskandarmounif 3 роки тому

    Thanks

  • @gamblethedog
    @gamblethedog 3 роки тому

    Shouldn't your @State and @Binding properties be private?

    • @SwiftyPlace
      @SwiftyPlace  3 роки тому +3

      This is a good question. Private is used for access control, so no one can change the property from the outside (a parent view). @State is used for properties that are owned by the view and thus should not be set from the outside. To enforce this it is common practice to make @State private. The situation is quite different for @Binding properties, which require to be set from the outside of the view. If you try to set a value like @Binding var property: Bool = "this will give an error". We cannot make @Binding private or the property would not be able to get the value from its parent view. This question actually highlights the difference between @State and @Binding 😁.

  • @benceylan273
    @benceylan273 3 роки тому +1

    Please use dark mode on your tutorials. I really like your teaching style and want to follow but lıght mode burns my eyes. Please

    • @CraigTemple
      @CraigTemple 3 роки тому

      I like white background.
      You can change your screen brightness. Even set an accessibility shortcut so that a triple press of the side button sets Reduce White Point, which can make the screen as dark as you want.

    • @UMBerto-wj7ch
      @UMBerto-wj7ch 3 роки тому

      Absolutely agree

  • @markme7092
    @markme7092 3 роки тому +1

    Hello Ma’am , I stuck in my project. How to enable button once every 2 hours, when user tap on then button is disabled for next 2 hours? Please make a video in SwiftUI !

  • @prettygirl6146
    @prettygirl6146 2 роки тому

    she does all the other stuff and missing out the main thing we have to skip skip skip skip forever until we actually see she's using the binding