Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Objective-C, Python, Ruby Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-01-2011, 09:22 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Location: Preston, England
Posts: 20
AdColvin is on a distinguished road
Send a message via Skype™ to AdColvin
Default What Are Block Objects?

I have a reasonable amount of experience with Objective C, but I'm reading the iOS Application Programming Guide at the moment and one of the stated design patterns is the use of block objects.

I've looked at Apple's documentation on block objects, but it seems fairly cryptic to me and I'm having trouble grasping the concept.

Can anybody put the concept into laymen's terms for me?

Of course, with it being a design pattern for iOS, it might be that I've used them before without realising it, or that I've just not come across a need to use them yet.

Any information on what they are and why I might find them useful would be hugely helpful.

Many thanks,
Adam
AdColvin is offline   Reply With Quote
Old 02-02-2011, 08:35 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 580
ChrisL is on a distinguished road
Default

Blocks aren't a design pattern, they're an addition to the language. The same construct is sometimes called 'closures' in other languages. There's a good overview of the concept and syntax here, and a nice article that discusses why they're beneficial on Cocoa for Scientists.
ChrisL is offline   Reply With Quote
Reply

Bookmarks

Tags
blocks, design pattern, objective c

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 488
16 members and 472 guests
7twenty7, AlanFloyd, AppsBlogger, David-T, iAppDeveloper, imac74, Jaxen66, lovoyl, Music Man, mutantskin, Paul Slocum, Sami Gh, SLIC, solardrift, unicornleo, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,683
Threads: 94,131
Posts: 402,932
Top Poster: BrianSlick (7,990)
Welcome to our newest member, unicornleo
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:12 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0