O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. Introducing Blocks

Blocks are one of the most powerful and underutilized features of Objective-C. It is important that you understand blocks as more system calls start taking them as arguments. Blocks are part function, part method, and part variable. For many, blocks can appear magical, especially the way they seem to pull in the variables around them.

This chapter introduces you to blocks and helps you avoid the most common mistakes. You start by learning the basics of blocks: what they are and how to declare, use, and write them. Then you use your understanding of blocks to make the About taxi more inviting.

Next, you learn more about blocks, including other variables, their most powerful feature and the source of most mistakes. Then you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required