I'm pursuing perfection with Enums. However, I have run into a problem that two hours of googling and trial and error wasn't able to surmount. I have a list of options that I am iterating over in a ForEach loop (SwiftUI, obviously). I would like the user to be able to turn these options on or off. I'm using the CaseIterable to do this (.allCases). And I have a computed variable called "selected" (Bool) that is set to false by default. I would like the user to be able to tap the option to turn it on (ie. to change the state of the selected. Is there a way out of this?
10:10 "This works for Ints, Doubles and Floats" I tried this: enum Numbers: Double { case one = 1.0 case two . . case five } //Xcode: 'Numbers' declares raw type 'Double', but does not conform to RawRepresentable and conformance could not be synthesized. //Xcode: Enum case must declare a raw value when the preceding raw value is not an integer So, autosetting rawValues for next cases fails What I'm doing wrong? Merci!
@@StewartLynch table view to to table view in UIKIT. How do you pass data from one list view to another. So far I didn't find one video explaining this. Thanks
My focus is more on SwiftUI now along with core Swift language concepts. What you are looking for is a tutorial on passing data from one viewcontroller to another. You don’t pass data from a table view to another. The viewcontroller usually handles this through datasource delegation.
This is the best explanation for enums on TH-cam. I really like how you teach and how you break your lessons down topic by topic! You're awesome!
Glad it was helpful!
@@StewartLynch It was very helpful! Thanks a lot.
Excellent as usual. Thanks Stewart.
Very deep explanation of each topic. Thank You!
Glad you like it.
For me as beginner the best video so far! Huge THANKS 🙏
Happy to hear that!
Thank you very much Stewart...
I'm grateful for this Stewart. Amazing help to jog my memory on the spot 🥰
Thank you so much ☺️
I was looking for it 👍👍
I had problems with understanding enum before 😳
You are fantastic ❤️😍❤️
Looking forward to your new videos!
The previous ones are OK too :).
Thank you for this video! It was very helpful!
I'm pursuing perfection with Enums. However, I have run into a problem that two hours of googling and trial and error wasn't able to surmount. I have a list of options that I am iterating over in a ForEach loop (SwiftUI, obviously). I would like the user to be able to turn these options on or off. I'm using the CaseIterable to do this (.allCases). And I have a computed variable called "selected" (Bool) that is set to false by default. I would like the user to be able to tap the option to turn it on (ie. to change the state of the selected. Is there a way out of this?
Can you DM me on Twitter or send me an email and we can discuss.
Thank You Very Much Really Helpful!!!
10:10 "This works for Ints, Doubles and Floats"
I tried this:
enum Numbers: Double {
case one = 1.0
case two
.
.
case five
}
//Xcode: 'Numbers' declares raw type 'Double', but does not conform to RawRepresentable and conformance could not be synthesized.
//Xcode: Enum case must declare a raw value when the preceding raw value is not an integer
So, autosetting rawValues for next cases fails
What I'm doing wrong? Merci!
change your case to case one = 1 and not 1.0
@@StewartLynch Sorry, my own mistake. It works now. Thank you.
when will your new video will come ?
I try to release a new video every Sunday. Subscribe to my channel and ring the bell and you will get notified.
Hi can you show us how to make list to list array in swiftui! Thanks
I am sorry but I don’t understand what you mean. Can you explain more?
@@StewartLynch table view to to table view in UIKIT.
How do you pass data from one list view to another. So far I didn't find one video explaining this. Thanks
My focus is more on SwiftUI now along with core Swift language concepts. What you are looking for is a tutorial on passing data from one viewcontroller to another. You don’t pass data from a table view to another. The viewcontroller usually handles this through datasource delegation.