O'Reilly logo

Pro Multithreading and Memory Management for iOS and OS X by Kazuki Sakamoto, Tomohiko Furumoto

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

Chapter 4

Getting Started with Blocks

Blocks are Clanguage extensions introduced for OSX Snow Leopard, iOS4, or later. This chapter shows what Blocks are in detail so that their implementation (covered in the next chapter) will hold more meaning. Checking the implementation leads to an understanding of how to use them and how they work. To put Blocks in perspective, consider the following scenario.

When you read iOS or OSX application source code, you might find some strange sentences in it. Such sentences have function declarations inside a function. In our experience this syntax has not been found previously with C and Objective-C. The GameKit component (new in iOS4) uses the syntax quite often to make the application source code elegant. ...

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