Interactive @Query in SwiftData - Change Query Properties with a Picker (ToDo List App)

Поділитися
Вставка
  • Опубліковано 14 чер 2023
  • How do you get a SwiftData Query to change its attributes / parameters interactively? In this lesson we'll show how you can use a Picker view in SwiftUI to send selections to a View, and have that View respond to the interaction by selectively initializing a Query with different .sort, ..order, and .filter / #Predicate parameters. We'll also learn to use _variableName to initialize a Swift Property Wrapper. Part of Prof. Gallaugher's Zero to Full Stack SwiftUI University course, which you can find, free, at bit.ly/prof-g-swiftui.
    The video lesson just before this is at: • SwiftData! Updating a ...
    The starter code for this lesson can be found at:
    github.com/gallaugher/ToDoLis...
    And you can find the shoutout Swifters I mentioned:
    / flowritescode
    / @stewartlynch
    And StackOverflow Swifter: stackoverflow.com/users/69369...
    Hack on!

КОМЕНТАРІ • 16

  • @MarvelousLXVII
    @MarvelousLXVII 8 місяців тому +2

    I had to watch this a few times but officially on 10-16-2023 at 4:45pm, it clicked with me lol! Thank you for doing this video.

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

      So glad you enjoyed this! More to come as I update the playlist so stay tuned. Cheers!

  • @m3zish
    @m3zish Рік тому +3

    Thanks for the information. I might need that kind of picker for my app, it's great explanation. Not that I doubt it will work, but would have been nice to see in the Not Done tab, you clicking on any of the items to see it disappear from the list dynamically 😁

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

    Thank you John… always excellent explanation 🎉

  • @wilburwongdev
    @wilburwongdev 6 місяців тому

    love the enthusiasm!

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

    Thanks!

  • @user-lz6dq6oi1d
    @user-lz6dq6oi1d 10 місяців тому

    Thanks for the intro, very helpful. How can I get the picker below the navigation title?
    Your insight very much appreciated!

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

    I'm new to SwiftUI development and have been messing about with a bunch of tutorials. I'm not able to find an answer to this and my google-foo is subpar. But how can you use swiftData with MVVM? Could you make a video showing how to split code from the view and passing the data.