December 2014
Beginner
300 pages
8h 9m
English
Closures in Swift have their own special syntax. When relating closures to Objective-C, you can think of closures as self-contained blocks of functionality. When you use them, you often directly replace an Objective-C block. You use them for things like creating a callback after a URL has been fetched from a server or calling a function when an animation is done. You use them for things like sorting, when you need to pass a special sort function.
Read now
Unlock full access