NEW: Subscribe to Hacking with Swift+ and accelerate your learning! >>

Difficulty with closures

Forums > 100 Days of SwiftUI

Does anyone have any suggestions on how to better undestand closures for a complete beginner?

I have been going over Day 6 and Day 7 for three days now because I want to make sure I fully understand them before moving on. I undestand the general concept - a bit of code assinged to a variable that can then be used inside of other functions when needed - but I'm having a hard time following the "signal flow" of the syntax and feel like I am miles away from being able to write my own closures, even relatively simple ones. Any tips would be appreciated. Thanks.


Hi! I don't think this is a right approach. Closures are complicated and take time to fully grasp. Using them and seeing them in context is key, so if I were you I would continue with the 100 Days and with time you get better understanding.


I agree with @nemecek-filip. If you know what a closure look like everytime one is used in the course you will see it and then be able to understand what it is doing and then you be writing them without thinking. Good luck with the rest of the course, Paul does a great job at explaining thing as you go along.


Thank you both for the insight. I was afraid not fully grasping something before moving on would snowball into a bunch of stuff I didn't know and I'd eventually get lost. I have tried learning other languages in the past and have gotten discouraged, but I'm determined this time! And Paul's layout and concise teaching style is great so I'm hoping to be successful this time!


Hacking with Swift is sponsored by NSSpain

SPONSORED Announcing NSSpain 2020: Remote Edition! An online, continuous conference for iOS developers. We’ll start on Thursday and finish on Friday, with talks, activities, and lots of fun for 36 hours, non-stop. Sound good? Join us!

Find out more

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

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

Not logged in

Log in

Link copied to your pasteboard.