Featured iPhone Development Resources iOS Development Source Code Examples

Handy Cheat Sheet For Using Objective-C Blocks (Closures)

Objective-C blocks (closures) are something that I’ve mentioned in the past several times, most recently in this post about this massive open source collection of Objective-C blocks extensions, and another about a great guide on how to easily enable asynchronous UITableViewCell’s with blocks and Grand Central Dispatch.

It has been over a year since blocks were added to the iOS SDK, but still I see many searches on this site looking for beginner tutorials and guides on using blocks.  So if you’re still trying to understand blocks you’re not alone, and I’ve found a great reference resource for you.

The resource is a cheat sheet by Yannick Loriot describing how to create, declare, call, copy blocks, and more all on a single printable page with some nice examples.

You can find the cheat sheet along with a nice summary on using blocks on Yannick’s site here.

A very handy reference to have if you are still trying to understand the syntax of Objective-C blocks.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.