9

What are some good suggested resources for learning about blocks and GCD in Mac OS X and iOS

niton
  • 8,771
  • 21
  • 32
  • 52
Abizern
  • 146,289
  • 39
  • 203
  • 257

6 Answers6

12

I would start with Apple's Blocks Programming Topics document or with Programming with Blocks on Apple Devices. As gs mentioned, also check out Mike Ash's articles (and also subscribe to his RSS feed, as I'm sure more blocks-related posts will come up):

Martin Gordon
  • 36,329
  • 7
  • 58
  • 54
6

There is a great introduction at bbum's weblog:
Basic Blocks

Thomas Zoechling
  • 34,177
  • 3
  • 81
  • 112
5

Mike Ash has written two articles about blocks in his blog:

  1. Friday Q&A 2008-12-26
  2. Friday Q&A 2009-08-14: Practical Blocks

In a third article he wrote about Grand Central Dispatch, which is also using blocks:
Friday Q&A 2009-08-28: Intro to Grand Central Dispatch, Part I: Basics and Dispatch Queues

Georg Schölly
  • 124,188
  • 49
  • 220
  • 267
2

This is a good introduction, and explains how to use a gcc patch to experiment with blocks under Leopard too:

Blocks Examples: NSOperationQueue and UIActionSheet

Felixyz
  • 19,053
  • 14
  • 65
  • 60
  • ...and to that we should add Plausible Blocks as a way to get experimenting with blocks even on Leopard: http://code.google.com/p/plblocks/ – Felixyz Sep 14 '09 at 21:27
2

If you're willing to pay the $300, the WWDC Mac session videos include several sessions on blocks and Grand Central Dispatch. The new APIs made possible by using blocks are also scattered throughout the remaining sessions that describe what's new in Snow Leopard.

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
  • I've been umming and ahhing over these. I suppose I should just bite the bullet. – Abizern Sep 03 '09 at 17:20
  • If you're at all serious about developing for the iPhone or Mac, each of the tracks are well worth the money. They're full of practical information, and the demos really show off the new technologies. – Brad Larson Sep 03 '09 at 23:13
0

Adding a bit more to my own question.

Blocks and GCD have been around for a couple of years now, so the online docs have been supplemented by other online resources. Even some of the iOS teaching books cover the subject.

However, the new book by Mark Dalrymple Advanced Mac OS X Programming has a couple of deeper chapters on Blocks and GCD that are of interest.

Abizern
  • 146,289
  • 39
  • 203
  • 257