One of the overall goals of Objective-C is to reduce the effort necessary to program complex applications through the use of object-oriented concepts, which can help to simplify and clarify the relationship between programming entities. In this chapter, you will learn how to create and use blocks, a syntactical feature that makes the language much easier and more expressive.
A block is a piece of code that can be passed around to other parts of the application, without the need to create a separate function, method, or class. Moreover, a block not only retains information about the code contained in it, but also about the variables that were in scope right at the time that the block was created. In this way, blocks are ...