29:25 we can simplify User class. Starting with iOS 14.5 "AppStorage property wrappers now work as expected when contained inside an ObservableObject, causing the system to emit the objectWillChange publisher.". This means we can change User class, and have just one property luckyNumber decorated with @AppStorage instead of @Published.
@Jager-yoo2 жыл бұрын
I like how you show the natural trial and error process! This video helps me a lot to understand SwiftUI Basic. Thanks from Korea. 😄
@candylover24563 жыл бұрын
Great tutorial, all your tutorials are really great, thanks so much for helping others !
@StewartLynch3 жыл бұрын
Thanks for your kind words
@ArchAid14 жыл бұрын
Loved this! Really nice and clear. Perhaps the best I've seen on property wrappers thus far (and I've seen a ton already). Thanks Stewart!
@StewartLynch4 жыл бұрын
Thanks Michael. Appreciate the feedback.
@jordibruin4 жыл бұрын
Very clear as we have come to expect from you Stewart, thanks and keep up the great work!
@xxfkee4 жыл бұрын
Very straightforward explanation with easy-to-understand samples. Thanks!
@StewartLynch4 жыл бұрын
Thanks. That is what I am hoping for.
@Luxubu20204 жыл бұрын
Thanks Stewart, I did not have to use the environment for the model sheet in the content view but the environment object did not crash on me. I am using Xcode 12.2. Wonder that changes since you had this lesson. Thank you for this great property wrappers V2.
@StewartLynch4 жыл бұрын
It is possible. I believe I made that video while 12 was still in beta
@larschristiansen31362 жыл бұрын
A great presentation, and complementary to Donny Wals's publications. Thank you Stewart for explaining the concept and its application . Property Wrappers is a great complement to SwiftUI, a necessary one as a matter of fact. Is there any documentation from Apple on which wrappers are "official " language extensions ?
@AndrewDChristie11 ай бұрын
Thanks!
@StewartLynch11 ай бұрын
Thank you
@muhammadusman-vc5re Жыл бұрын
May GOD bless on you for this effort.
@DavidKoontz2 жыл бұрын
Awesome walk thru! Thanks!
@Mahadev-x7u4 жыл бұрын
Great Gratitude for Amazing Lessons ....👍
@abdulwahabkhan43164 жыл бұрын
Magnificent as always ... thanks a lot @Stewart ... Did u gonna make a video for the remaining Property Wrappers ??
@StewartLynch4 жыл бұрын
Which ones are you interested in? There are so many. I just released on on creating your own custom property wrappers.
@abdulwahabkhan43164 жыл бұрын
@GestureState looks more interesting to me or other ones with similar names like @Envirment Vs @EnvirmentObject, @AppStorage Vs @SceneStorage ... but I am gonna leave it to you ... you know batter then me which one's are important and you should cover in your next video ...
@StewartLynch4 жыл бұрын
I cover all of these in different videos where they apply. For example gestureState is covered when I cover all of the gestures. Here is a list of all my videos. www.notion.so/Stewart-Lynch-KZbin-Videos-b8114bb08d57437f9e05facc40774184
@matthew_rodriguez4 жыл бұрын
Thanks for your super tutorials. It could be cool a tutorial about how to create custom property wrappers
@StewartLynch4 жыл бұрын
Thanks. That is on my list to do.
@savokid32823 күн бұрын
Thank you very much! it helps me a lot!
@arthur_darbinyan4 жыл бұрын
Very informative & clear. Thank you very much!!!!!!
@indiekiduk4 жыл бұрын
24:36 In the App struct, should you wrap var user with @StateObject so it is not lost if the App struct is recreated by SwiftUI?
@StewartLynch4 жыл бұрын
@Main is the entry point to the app so I don’t believe that it will get created, It is not a view.
@indiekiduk4 жыл бұрын
Maybe an App is created every time a new scene is created? I'll have to test that to see but Apple are using @StateObject for their MailModel in the docs: developer.apple.com/documentation/swiftui/app
@maqusss Жыл бұрын
in examples from apple they use @StateObject in App struct
@indiekiduk Жыл бұрын
@@maqusss yes because @StateObject prevents initialisation of that object during previewing of Views where it isn’t required or a different version is used.
@ZigBehaviour3 жыл бұрын
Another Crystal Clear presentation - greatly appreciated - I got an issues with UIKit warnings! relating to the use of .navigationBarTitle() and had to add .navigationViewStyle(StackNavigationViewStyle()) at the end of the NavigationView closure in ContentView.swift Also strangely I didn't find it necessary to add .environmentObject(user) on the creation of my ModalSheetView() have Apple modified the behaviour of sheets? It didn't crash for me and values updated fine!
@StewartLynch3 жыл бұрын
You no longer have to add the environmentObject when presenting modal views. That was changed in a recent update.
@Денис-ж3ф5р2 жыл бұрын
Would you mind please clarifying iOS targets in the future?