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

Declaring Blocks

Blocks use a modified function syntax. Like functions, blocks can take arguments and return values. This is the basic format of a declaration:

<ReturnType>(^<BlockName>)<(Arguments)>

Image ReturnType is the variable type returned by a block, if any.

Image BlockName is the symbol used for calling the block. The caret (^) is the system-wide indicator preceding the declaration of a block.

Image Arguments is an optional ...

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