Introduction to enums in Swift

Поделиться
HTML-код
  • Опубликовано: 13 окт 2024

Комментарии • 29

  • @shadieossei4336
    @shadieossei4336 3 года назад +2

    This is the best explanation for enums on RUclips. I really like how you teach and how you break your lessons down topic by topic! You're awesome!

  • @macmcmillen6282
    @macmcmillen6282 11 месяцев назад

    Excellent as usual. Thanks Stewart.

  • @tigran.zakaryan
    @tigran.zakaryan 2 года назад

    Very deep explanation of each topic. Thank You!

  • @sokolek310385
    @sokolek310385 3 года назад

    For me as beginner the best video so far! Huge THANKS 🙏

  • @rungxanh2901
    @rungxanh2901 3 года назад

    I'm grateful for this Stewart. Amazing help to jog my memory on the spot 🥰

  • @andrejkling3886
    @andrejkling3886 3 года назад +1

    Thank you very much Stewart...

  • @ضدالظلم-د4ح
    @ضدالظلم-د4ح 4 года назад

    Thank you so much ☺️
    I was looking for it 👍👍
    I had problems with understanding enum before 😳
    You are fantastic ❤️😍❤️

  • @radhapatel5848
    @radhapatel5848 4 года назад

    Thank you for this video! It was very helpful!

  • @gakkieNL
    @gakkieNL 4 года назад

    Looking forward to your new videos!

    • @StewartLynch
      @StewartLynch  4 года назад

      The previous ones are OK too :).

  • @eliasengineering753
    @eliasengineering753 4 года назад

    Thank You Very Much Really Helpful!!!

  • @jankuna9479
    @jankuna9479 Год назад

    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
      @StewartLynch  Год назад

      change your case to case one = 1 and not 1.0

    • @jankuna9479
      @jankuna9479 Год назад

      ​@@StewartLynch Sorry, my own mistake. It works now. Thank you.

  • @ArchAid1
    @ArchAid1 3 года назад

    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?

    • @StewartLynch
      @StewartLynch  3 года назад +1

      Can you DM me on Twitter or send me an email and we can discuss.

  • @sazidhasandip6854
    @sazidhasandip6854 3 года назад

    when will your new video will come ?

    • @StewartLynch
      @StewartLynch  3 года назад

      I try to release a new video every Sunday. Subscribe to my channel and ring the bell and you will get notified.

  • @firemob955
    @firemob955 4 года назад

    Hi can you show us how to make list to list array in swiftui! Thanks

    • @StewartLynch
      @StewartLynch  4 года назад

      I am sorry but I don’t understand what you mean. Can you explain more?

    • @firemob955
      @firemob955 4 года назад

      ​@@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

    • @StewartLynch
      @StewartLynch  4 года назад +1

      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.