Summary

In this chapter, you have gotten an introduction to blocks. You started by learning how to declare, use, and write blocks. You also learned some shortcuts for writing blocks. Next, you added pulsing to the About screen’s taxi and learned about animating view constraints.

Next, you learned about variable scope, one of the most powerful features of blocks. Then you learned about read-only versus read/write variables and why you can change parts of a copied object. Finally, you replaced the ViewCarProtocol with blocks.

Now that you understand blocks, you can use them for more than just arguments to system calls. Blocks provide an easy and powerful way to pass information and actions between objects of the same class or different classes. ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.