问题
What are some good suggested resources for learning about blocks and GCD in Mac OS X and iOS
回答1:
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):
- Friday Q&A 2008-12-26
- Friday Q&A 2009-08-14: Practical Blocks
- Friday Q&A 2009-08-28: Intro to Grand Central Dispatch Part 1
回答2:
There is a great introduction at bbum's weblog:
Basic Blocks
回答3:
Mike Ash has written two articles about blocks in his blog:
- Friday Q&A 2008-12-26
- 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
回答4:
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
回答5:
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.
回答6:
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.
来源:https://stackoverflow.com/questions/1366955/suggested-resources-for-learning-about-blocks