I wish I can give you 100 likes... Awesome explanation with example!!
@asseeger3 жыл бұрын
Very valuable inputs, thanks! It kind of clicked now for me what happens when a binding property is recreated because a view is recreated. Well done.
@benceylan2733 жыл бұрын
Thanks. I like your teaching style. Using Dark mode Xcode on your tutorials would be better.
@borkware3 жыл бұрын
as someone who finds darkmode difficult to read, I respectfully disagree :-)
@SwiftyPlace3 жыл бұрын
Just when I thought I should give dark mode a try 😂
@borkware3 жыл бұрын
@@SwiftyPlace You do you. It's your channel :-D
@UMBerto-wj7ch3 жыл бұрын
+1 for dark mode. Definitely.
@XBassSlayerX3 жыл бұрын
Some of the best SwiftUI content on KZbin. 10/10
@byaruhaf2 жыл бұрын
Thanks Karin, Awesome Explanation.
@vladimirmoor3 жыл бұрын
Thanks! Very helpful video! Perfect explaining differences where use @StateObject and where @ObservedObject.
@valentine19253 жыл бұрын
this is superb!! you like made a shortcut for the gotchas of those property wrappers
@antonsergeyev26243 жыл бұрын
Thanks for the great Video!
@_walkman3 жыл бұрын
Thank you. Exactly what I was looking for :-)
@zzzMrAngelzzz3 жыл бұрын
Thank you! Your doing a great content!
@dannestrom3 жыл бұрын
Wouldn't it also be possible to wrap the Player in a struct and use @State with that struct? The struct will be preserved when the view is re-created, and the struct will instantiate the Player in it's constructor, so the Player object will also be preserved between view re-creations.
@lichb0rn3 жыл бұрын
And then you'll end up with a lot of environment objects :) Maybe it's my little coding experience, but I feel in pursue to solve some problems of UIKitI, Apple made others with passing data in SwiftUI.
@kell76893 жыл бұрын
I like your explanations! Are you optimistic about SwiftUI for the long term?
@SwiftyPlace3 жыл бұрын
I have some mixed feelings about it. SwiftUI gets more stable (that means I don't have to check the app functionality with every new iOS release). The crucial point for me is NavigationView. It keeps on pushing some of my views in an "unexpected behaviour". As long as I don't have very specific design requirements, SwiftUI is great and fast. But customisation sometimes takes me more time than just UIKit would have taken me. Take MapView for example. For more control (which is most cases), I would need to drop down to UIKit. For me the new features and evolution of SwiftUI are not moving very fast. During WWDC2021 we got mostly design features e.g. button styles but nothing ground breaking.
@kell76893 жыл бұрын
@@SwiftyPlace I feel the same, and I also have issues with how Navigation is handled. I hope SwiftUI becomes everything I hope it will. Coming to this from the Android SDK is like a dream, just need it to fill out a bit more.
@markaurelius612 жыл бұрын
At 7:30 Herr Katze is very interested in the fact that @Published properties have a Publisher.
@littlerubiesdaycare3 жыл бұрын
Thanks for sharing this. I did a little bit of physics and chemistry in highschool and quickly realized it wasn't for me. I do however derive satisfaction from watching people who know physics. Hope you check us out too
@ahmedalfrash93003 жыл бұрын
thank you
@victorriurean Жыл бұрын
cool
@denages2 жыл бұрын
The example is too obvious. Everyone uses too simple cases. Show something like passing a ViewModel to a cell view as a parameter (the view model also has its parameters) where the cell view should react on different view models passed in. What kind of state will you use? If you use @ObservableObject then you can loose the state of cells. If use @StateObject then a cell view won't react on a new view model because @StateObject initialiser has an @autoclosure
@SwiftyPlace2 жыл бұрын
I think it is good to show simple cases for a beginner level tutorial. But it seems you are looking for more advanced discussion. I might do an example with multiple views that share data between them. Mostly by view models. Just to see the flow of data with @StateObject on the top level and @ObservedObject for all child views. Maybe talking about how to connect multiple view models together. Did you have any problems with this topic in particular?