MENU

Fun & Interesting

Swift Closures Explained

Sean Allen 73,166 2 years ago
Video Not Working? Fix It Now

Head to https://squarespace.com/seanallen to save 10% off your first purchase of a website or domain using code SEANALLEN. I explain what confused me most when learning closures. What do the parenthesis mean? What are the $ in closures (shorthand syntax)? What does @escaping mean? What is Trailing Closure Syntax? This Swift tutorial was created in Xcode 14. Automatic Reference Counting - Memory Leaks & Retain Cycles: https://youtu.be/VcoZJ88d-vM iOS Developer Courses https://seanallen.teachable.com/ Twitter: https://twitter.com/seanallen_dev Hired.com: https://hired.com/x/1n01g Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links): Paul Hudson's Hacking With Swift: https://gumroad.com/a/762098803 Donny Wals - Combine: https://gumroad.com/a/909014131 Mark Moeyken’s SwiftUI Books: www.bigmountainstudio.com/swiftui-views-book/fzc51 Objc.io Books (Thinking in SwiftUI & Advanced Swift): https://gumroad.com/a/656585843 Ray Wenderlich Books: https://store.raywenderlich.com/a/20866/link/1 #swift #softwaredeveloper #iosdeveloper Timestamps: 0:00 - These confused me 0:22 - Build a closure and pass it around 3:11 - Closure Types 5:17 - Shorthand syntax - $0, $1 5:30 - Trailing Closure Syntax Intro & Shorthand Syntax 9:34 - SwiftUI - Trailing Closure Syntax 12:09 - @escaping - What does it mean?

Comment