Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a good introduction or documentation on Objective-C blocks?

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?

like image 253
Ksinak Avatar asked Dec 10 '10 07:12

Ksinak


People also ask

How do you write blocks in Objective-C?

^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 ().

What is the purpose of block in Objective-C?

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 .

How do I download from Objective-C?

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.

What is the primary application for Objective-C?

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.


1 Answers

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

like image 180
Epaga Avatar answered Oct 01 '22 10:10

Epaga