I am trying to use blocks in Objective-C. I've worked through this tutorial, but I would like to know more about blocks.
Where should I look for better documentation or tutorials on Objective-C blocks and their usage?
^blockName: Always remember that the block name is preceded by the ^ symbol. The block name can be any string you like, just like you name any other variable or method. Remember that both the ^ and the block name are enclosed in parentheses ().
Blocks are a language-level feature added to C, Objective-C and C++, which allow you to create distinct segments of code that can be passed around to methods or functions as if they were values. Blocks are Objective-C objects, which means they can be added to collections like NSArray or NSDictionary .
In order to get full features of Objective-C, download and install GNUStep. This can be done by downloading the package from http://main.gnustep.org/resources/downloads.php.
Objective C is a general-purpose programming language that is safe for different types of data, focuses on objects. It is also basically a superset of C. Its main purpose is to help make apps for operating systems like OS X and iOS. Apple has been using Objective C since buying NeXT in the late 1990s.
Collecting the answers from the comments (and turning this answer community wiki for fairness) so we have an answer to this question:
Apple's official documentation
http://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Blocks/
Mike Ash
http://mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html
Cocoa With Love
http://cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With