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

Published: 07 April 2023
on channel: Get Swifty
7,603
265

You may have heard "Closures are functions!", but what does that mean EXACTLY? In this video I break it down by starting from basics, and building up to what makes a closure... a closure.

They can be super confusing for beginners. Following code paths and logic is tricky, but I am here to explain it all to you.

We'll start from basic concepts like variables to computed variables, to functions, to closures. I think linking them all together and slowly adding more complexity to the explanation will help you to fully understand how they work.

Let me know if you also want me to do one for Value vs Reference types. I know that's been done a bunch too, but I think I have a super simple and intuitive way of explaining them for newcomers.

If you're into TTRPGs you might also like my app:
https://summoningstone.app

00:00 - Intro
00:20 - Variables
01:22 - Parameters
02:24 - Computed variables as parameters
02:54 - Convert computed variables to functions
03:34 - Using functions as parameters
05:10 - Closure Syntax
06:00 - Parameters within functions passed as parameters
08:20 - Extras - Closures as Callbacks
13:00 - Reusing code
15:10 - Skip if you're new. Advanced sidebar on generics
16:30 - Outro and final ideas

---------------------
Want to chat or ask questions about Swift or a career in software development?

Discord
  / discord  

Patreon - Get my book and code created on this channel!
  / beaunouvelle  

Play tabletop games? I made a music and sound effects app for you called Summoning Stone.
https://apps.apple.com/app/apple-stor...

------------------

#swiftui #iosdeveloper #swiftuitutorial


Watch video Swift Closures Explained - The ONLY video you'll ever need! online without registration, duration hours minute second in high quality. This video was added by user Get Swifty 07 April 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,603 once and liked it 265 people.