O'Reilly logo

Effective Objective-C 2.0: 52 Specific Ways to Improve Your iOS and OS X Programs by Matt Galloway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Blocks and Grand Central Dispatch

Multithreaded programming is something that every developer is going to need to think about with modern application development. Even if you don’t think that your application is multithreaded, it most probably is because system frameworks often use extra threads to get work done off the UI thread. There’s nothing worse than an application that hangs because the UI thread is blocked. In Mac OS X, this results in the dreaded spinning beach ball; in iOS, your application may be terminated if it blocks for too long.

Fortunately, Apple has thought about multithreading in a whole new way. The core features of modern multithreading are blocks and Grand Central Dispatch (GCD). Although distinct and separate technologies, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required