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

Using Blocks

You call blocks in much the same way you call functions. For a named block, this works just as you would expect:

<ReturnVariable> = <BlockName>(<Arguments>);

Image ReturnVariable is an optional variable for holding the value returned by a block. If the block has no return value, you omit both ReturnVariable and the equals sign.

Image BlockName is the symbol used for calling the block.

Image Arguments is an optional list ...

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