Swift Closures Explained - The ONLY video you'll ever need!

Sdílet
Vložit
  • čas přidán 12. 09. 2024

Komentáře • 37

  • @Mustafa-cp8wc
    @Mustafa-cp8wc Před měsícem

    Watched like five videos on closures. This one finally clicked with me!

    • @GetSwifty
      @GetSwifty  Před měsícem

      Thank you! Super glad it helped!

  • @itsAJ819
    @itsAJ819 Před 5 měsíci

    Geez where have you been all my life? I needed this.

  • @lilwilly4953
    @lilwilly4953 Před 11 měsíci

    This definitely deserves more views! Great explanation and breakdown. 👍

  • @WhatDoINameMyChannel
    @WhatDoINameMyChannel Před rokem +1

    Your video has been the best at explaining Functions so far (better than Paul Hudson, Sean Allen, Stewart Lunch, and some others), but I’m still confused. The beginning was great but you slowly lost me. I think it’s just all these new terms I need to get used to understand (functions, passing through, a value, reference, etc, etc). Also I think I need to understand a bit more past basics before I get to closures too.
    I’m on Day 9 of 100days, and this topic was a big speed bump for me. Been watching CZcams videos all day and finally got to yours and it’s been my favorite. Hope to see more.

    • @GetSwifty
      @GetSwifty  Před rokem +1

      Thank you so much! I’m super glad it helped. Yeah I probably should have been more clear after the first few examples to quit the video early to avoid the extra complexity! Live with the easy knowledge for a while, then come back later.
      I plan to make a video on value/reference types too with physical examples, not just code. Explained in a few different ways.
      Thanks for the comment. Really helps me understand if I’m on the right track with explaining things.

  • @MustafaAlmeer
    @MustafaAlmeer Před 2 měsíci

    That's really what I was looking for. THANK YOU

  • @antlister
    @antlister Před 5 měsíci

    Yes, I consider this my new recommended resource on closures. Appreciated the extra steps to show how nothing breaks and the context you gave throughout. I think the music was a little too loud if I had one criticism. An easy like and subscribe and I look forward to new videos.

    • @GetSwifty
      @GetSwifty  Před 5 měsíci

      Thank you! I wish I could go back and edit the music quieter :(

  • @vojtechkalivoda8455
    @vojtechkalivoda8455 Před rokem +2

    Thanks for the video!! I feel like it just takes many tries to understand it and make it click finally. The real life example with URLSession was great too 😇 just in playground it is hard to image how I can implement it in my beginner apps😅 that would be a very nice follow up video, idk using MVVM in some small beginner app and use the closures!! Anyways thanks a lot mate!!

    • @GetSwifty
      @GetSwifty  Před rokem +1

      Ooo not a bad idea. Thanks so much for watching. Glad you found it useful.

  • @mdsubbirrahman1395
    @mdsubbirrahman1395 Před 5 měsíci

    I loved it. Best video on closure.

  • @kaiaugust9906
    @kaiaugust9906 Před rokem +4

    hm at 5 mins into the video. It still does not make sense to me.

    • @GetSwifty
      @GetSwifty  Před rokem +1

      Oh for real? How long have you been programming? If you have discord, you can join mine (link in description) and I’d be happy to go over it again with you. Maybe tackle it from some other angles!

  • @mullypimpz
    @mullypimpz Před rokem

    Thanks for this, if I understood correct, you're inserting a block of code that will be ran at some point in the function, usually to be ran after a code that may take awhile like a network call. Then you can insert the result of that long running code as a parameter of the closure. This means the closure is only ran after the network call has been completed. I hope I got that right...

    • @GetSwifty
      @GetSwifty  Před rokem +1

      100% correct. You've got it!

  • @ReddyMediaMarketing
    @ReddyMediaMarketing Před měsícem

    Do you offer brainstorming / opinion for hourly rate? Im a college student who just built an app and would love to get your opinion and some advice for my project.

  • @billnerp
    @billnerp Před 10 měsíci

    Great video. Feel free to make more closure videos :)

  • @jlambert12013
    @jlambert12013 Před 11 měsíci

    Thank you!

  • @ShortDoMorgans
    @ShortDoMorgans Před 5 měsíci

    why in the request closure you don't use the @escaping flag once in the real URLSession's closure are used?

    • @GetSwifty
      @GetSwifty  Před 5 měsíci

      Mainly because then I'd have to explain it, and for a video on the basics I wanted to avoid confusing people.

    • @ShortDoMorgans
      @ShortDoMorgans Před 5 měsíci

      ​@@GetSwifty please make a video explaining when and why use @escaping flag, I think this really confuse :)

  • @leon.dev89
    @leon.dev89 Před 2 měsíci

    1 step closer to understanding Closures 😅

  • @Ironzee
    @Ironzee Před 10 měsíci

    Good stuff

  • @Nealcar30489
    @Nealcar30489 Před 7 měsíci

    I found out the only way at 5:03 makes sense is when you use Swift Playgrounds and use the step through my code feature. I was able to understand when the two different codes get called.

    • @GetSwifty
      @GetSwifty  Před 7 měsíci

      That’s awesome! I’m really happy that the video helped you out! Thanks for letting me know!

  • @MuhammadYashab-z5k
    @MuhammadYashab-z5k Před 4 měsíci

    The video is great but that background sound is super distracting
    either completely remove it or slow it down

    • @GetSwifty
      @GetSwifty  Před 4 měsíci +1

      Yeah I can’t really change that now I’m sorry. Others have pointed that out. Maybe I could try a re-upload I’ll see what tools are available

  • @WhatDoINameMyChannel
    @WhatDoINameMyChannel Před měsícem

    👎🏽 still doesn't make sense, but at least it was better then other videos on Closures so far.

    • @GetSwifty
      @GetSwifty  Před měsícem

      If you’re still having trouble we can chat somewhere? What isn’t working for you?

  • @charlescarriere6589
    @charlescarriere6589 Před 11 měsíci +1

    Got me part of the way there, I think. I would like an explanation of the syntax "like I'm 5". Overall this was helpful. FWIW, I think the music should be at a lower volume relative to your voice. I found it distracting at times. Thank you for this, however.

    • @GetSwifty
      @GetSwifty  Před 11 měsíci +1

      Shame about the music. Sorry! But thanks for the feedback on it. I’ll fix it up on future videos!
      Sounds like a separate Swift syntax video would be useful. I’ll have a think!