UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

DAY 27

Project 5, part one


You probably remember learning about closures a couple of weeks ago, mostly because it was a particularly tough part of the course. Since then I’ve tried to work them back in slowly so you can master them little by little, and today it’s time to dive into them with our own closure.

I think you already know what I’m going to say, but I’ll say it anyway: this isn’t going to be easy. But the US general George Patton once said, “accept the challenges so that you can feel the exhilaration of victory” – when you finally feel like you understand closures (which might be today!) that’s when you know you’re really getting comfortable with Swift.

Today I’ll be introducing a new aspect of closures called capture lists. To make things easier, I prepared a new article just for this series that explains in detail what capture lists are and how they work – you should start by reading that.

Today you should work through the article on capture lists, then the three topics from project 5.

Need help? Tweet me @twostraws!

 

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

100 Days of Swift


The 100 Days of Swift is a free collection of videos, tutorials, tests, and more to help you learn Swift faster. Click here to learn more, or watch the video below.

Back to 100 Days of Swift

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.