How to use Access Control (Private vs Public) | Swift Basics #12

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

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

  • @swiftodyssey
    @swiftodyssey 26 минут назад

    Would like to point out that @9:19 the variables are actually internal to the module and not public

  • @kavinda_dilshan_paramsoodi
    @kavinda_dilshan_paramsoodi Год назад +3

    I've never heard of Step Brothers, and I just watched the trailer and will watch it. Thanks.

  • @MA-qr6vh
    @MA-qr6vh 9 месяцев назад +1

    Just want to say that you are the best. Thank you, Nick!

  • @ubu-ibme
    @ubu-ibme 8 месяцев назад

    Woot woot! We cruizin'! Think I'm finally comfortable with the syntax... getting there. Can't thank you enough, Nick! 🙏🏻

  • @Brychyx
    @Brychyx Год назад +1

    Awesome videos with proper knowledge. Also very easy to learn from your courses. Thank you!

  • @АртемОлеговичМоисеев

    Great lesson! Thank you very much!💫

  • @psaudade
    @psaudade 7 месяцев назад

    Excelente Videos! Learning a lot. You can use a private var on movie2 and with setter and getter go for a read/write new values. I've made a new mutating func on the struct that is called from the class passing the title arguments. Worked fine! I know you can do that, but i'm learning!!!!! Great Job you are doing, continue!

  • @AdamTabiev
    @AdamTabiev Год назад +1

    Nick thank you for another quality lesson🔥

  • @SaurabhJain-m8d
    @SaurabhJain-m8d 4 месяца назад +2

    I like the way you explain the code, however, one thing I have noticed is the IDE(Xcode) doesn't work properly. Sometimes it doesn't show the compilation errors.

    • @SwiftfulThinking
      @SwiftfulThinking  4 месяца назад +2

      This has something to do with the playground environment. In the next playlist we will use the normal Xcode environment which works better

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

    Hey, Nick! As always, great and brilliant.

  • @unitedastronomer
    @unitedastronomer 6 месяцев назад

    theyre finally making senseee omg

  • @Rafaglg
    @Rafaglg 7 месяцев назад +1

    i have heard that the var func and everything which is not marked as private is internal, i want to ask, is internal or public?

    • @SwiftfulThinking
      @SwiftfulThinking  7 месяцев назад +1

      Technically ‘internal’ but most people don’t understand what that difference is at this point

  • @cheunghowie2596
    @cheunghowie2596 3 месяца назад

    Really nice lesson! Thank you so much!!!!

  • @kamaldeepak4282
    @kamaldeepak4282 Год назад +2

    Thank you ❤

  • @Declan-Jo6n
    @Declan-Jo6n Год назад

    Thank you

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

    I looked upon some resources and found that if you do not write any access control keywords and the default is actually internal, meaning internal to the module

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

    Step Brothers 😂 That's my fav

  • @gibber1sh-c6w
    @gibber1sh-c6w Год назад

    I'm looking at his code at around 9:15 and I'm getting errors if I have it the way he has it. It will work if I refactor it to this:
    ```
    class MovieManager{
    var movie1: MovieModel
    var movie2: MovieModel
    var movie3: MovieModel
    init(){
    movie1 = MovieModel(title: "Avatar", genre: .action, isFavorite: false)
    movie2 = MovieModel(title: "Step Brothers", genre: .comedy, isFavorite: false)
    movie3 = MovieModel(title: "Avengers", genre: .action, isFavorite: false)
    }
    }
    ```
    Why?

  • @DannyBoy443
    @DannyBoy443 6 месяцев назад +1

    Of the 3 movies listed, I go w/ Avengers. It makes me feel like a kid again and I didn't even like the other two lol.

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

    Yo!

  • @MuhammadHuzaifa-t2s
    @MuhammadHuzaifa-t2s Год назад

    Avengers is my fav❤