11:05 Wrapping regex string literals with hash symbols is a much cleaner and simpler solution than manually dealing with escape characters which can be error-prone when done by hand.
Only now found this video - yet again very helpful. What I don't get with SwiftUI is, how this can be efficient?!? Take in this example isValidPasswod(): It's called to set the sign-up button's opacity, to set that button's disabled state and to set the text prompt for the password field ... so the exact same RegEx match is performed at least three times. I know it's not much in this example, but in huge applications with complex models these things could stack up pretty quickly, couldn't they?
This is awesome! Question though, how to validate the fields only when the button is press and add red border to the field not passed the validation? Thanks
@@StewartLynch He refers to the part at 12:57 when you adding @Published (or removing @State earlier in the video) in bulk edit for lack of better term. I'm curious about that one too. Thank you
@@runQgC Oh. I See what is being asked. Xcode has multi-cursor support. You can access multi-cursor mode by holding down the Ctrl & Shift keys and left-clicking in your source file. An additional cursor will appear on screen for each left-click performed. From there, any key you hit will perform that action for every cursor, including highlighting text.
Being Canadian, its gotta be a zed stack, lol! So how it it different from your garden variety pushdown stack? Or a horizontal or vertical stack on a storyboard?
SwiftUI stacks are different from UIKit stacks. SwiftUI is a declarative ui design architecture so I can't really answer this question in a few words. Here is a web post that might clear things up, www.simpleswiftguide.com/how-to-use-stacks-hstack-vstack-and-zstack-in-swiftui-equivalent-of-uistackview-in-uikit/
Stewart Lynch aha! Got it. One of these days I will need to spend some time and dive in SwiftUI. Thanks Stewart, and I am getting lots out of your videos especially the ones that are ae not way over my head, lol! The git series was especially useful. Thx again.
Hi Stewart, thanks for yet another fantastic video. I downloaded the project and just to experiment I tried removing the @Published wrappers from the String properties in the view model. Obviously, the signUp() method didn't work because the view model was unable to emit the values without the wrapper. It's the console message I started receiving while modifying the text fields I'm curious about and I wonder if you have any insight? "Binding action tried to update multiple times per frame." Cheers.
Amazing video, thank you so much, I REALLY learned a LOT. Allow me to share some knowledge with you, too (I have 10 yrs of programming experience, not with swift though) 1) it's better to return the boolean result of expression itself, so instead of something like this if expression_1 && expression_2 && expression_3 { return true } else { return false } it's better to do something like this return expression_1 && expression_2 && expression_3 2) with simple constant values returned from a simple boolean expression, instead of this if some_bool { return "abc" else { return "xyz" } you could do this return some_bool ? "abc" : "xyz"
True. Perhaps mistitled, but it is likely more how devs are developing with SwiftUI than with pure MVVM. Mark Moekens calls the VOODO - View - Observable Objects - Data Objecrts
WOw I'm going to say, I was scared when you said MVVM but it became really clear when you started showing it. Thank you so much!
This wasn’t long at all, because it has value. It is great and clearly explained session. Thanks you for that.
11:05 Wrapping regex string literals with hash symbols is a much cleaner and simpler solution than manually dealing with escape characters which can be error-prone when done by hand.
You are amazing 😉
Thank you so much 😊
I am waiting your videos every day.
My best wishes for you 👍😍❤️🌹🥰
What a king!!! Sharing valuable knowledge
I like your teaching style Sir
Lovely
Thanks and welcome
great job but i have a comment on an issue
the prompts shouldn’t appear immediately when the user runs the app
This is just an example of this screen. You can choose to implement it any way you like.
Seriously it's an amazing tutorial.
Only now found this video - yet again very helpful. What I don't get with SwiftUI is, how this can be efficient?!? Take in this example isValidPasswod(): It's called to set the sign-up button's opacity, to set that button's disabled state and to set the text prompt for the password field ... so the exact same RegEx match is performed at least three times. I know it's not much in this example, but in huge applications with complex models these things could stack up pretty quickly, couldn't they?
This is awesome! Question though, how to validate the fields only when the button is press and add red border to the field not passed the validation? Thanks
Such great content. Thank you Stewart !
MVVM! 😍
I'm wondering why the isSignupComplete not a @Published variable?
It is a computed property that is the result of the evaluation of 3 published propeties.
Spot on.
Awesome session but how is you deleted your @State Private all the same time
Sorry. I don’t understand what you are referring to. Can you give me a time stamp on the video to see what you mean?
@@StewartLynch He refers to the part at 12:57 when you adding @Published (or removing @State earlier in the video) in bulk edit for lack of better term. I'm curious about that one too. Thank you
@@runQgC Oh. I See what is being asked. Xcode has multi-cursor support. You can access multi-cursor mode by holding down the Ctrl & Shift keys and left-clicking in your source file. An additional cursor will appear on screen for each left-click performed. From there, any key you hit will perform that action for every cursor, including highlighting text.
@@StewartLynch Thank you Stewart!
which Tool you use to make videos
I use Camtasia from Techsmith
What is a z stack?
A SwiftUI depth stack where views are place on top of each other. You may say zee stack and I may say zed stack.
Being Canadian, its gotta be a zed stack, lol! So how it it different from your garden variety pushdown stack? Or a horizontal or vertical stack on a storyboard?
SwiftUI stacks are different from UIKit stacks. SwiftUI is a declarative ui design architecture so I can't really answer this question in a few words. Here is a web post that might clear things up, www.simpleswiftguide.com/how-to-use-stacks-hstack-vstack-and-zstack-in-swiftui-equivalent-of-uistackview-in-uikit/
Stewart Lynch aha! Got it. One of these days I will need to spend some time and dive in SwiftUI. Thanks Stewart, and I am getting lots out of your videos especially the ones that are ae not way over my head, lol! The git series was especially useful. Thx again.
Hang in there. Also sometimes you have to watch things more than once and then just practice by implementing a concept.
Hi Stewart, thanks for yet another fantastic video. I downloaded the project and just to experiment I tried removing the @Published wrappers from the String properties in the view model. Obviously, the signUp() method didn't work because the view model was unable to emit the values without the wrapper. It's the console message I started receiving while modifying the text fields I'm curious about and I wonder if you have any insight? "Binding action tried to update multiple times per frame."
Cheers.
Great tutorial! What's the github repo of this project? Thanks!
There wasn't one, but there is now:). Link is in the description
@@StewartLynch Thank you very much! Greatly appreciated!!
Amazing video, thank you so much, I REALLY learned a LOT. Allow me to share some knowledge with you, too (I have 10 yrs of programming experience, not with swift though)
1) it's better to return the boolean result of expression itself, so instead of something like this
if expression_1 && expression_2 && expression_3 {
return true
} else {
return false
}
it's better to do something like this
return expression_1 && expression_2 && expression_3
2) with simple constant values returned from a simple boolean expression, instead of this
if some_bool {
return "abc"
else {
return "xyz"
}
you could do this
return some_bool ? "abc" : "xyz"
Yes. Thanks. I use the ternary operator all the time. Thanks for offering an alternative
this isnt proper MVVM, there shouldnt be functions exposing fields in the VM, it should just be observables
True. Perhaps mistitled, but it is likely more how devs are developing with SwiftUI than with pure MVVM. Mark Moekens calls the VOODO - View - Observable Objects - Data Objecrts