Summary

This chapter introduced several techniques to process long-running tasks without interfering with the UI, including performSelectorInBackground:withObject:, operation queues, and Grand Central Dispatch queues.

Using the performSelectorInBackground:withObject: method on NSObject to execute a task in the background is the simplest approach, but provides the least support and management.

Operation queues can process tasks concurrently or serially, using a method call, a block, or a custom operation class. Operation queues can be managed by specifying a maximum number of concurrent operations, they can be suspended and resumed, and all the outstanding operations can be canceled. Operation queues can handle custom operation classes. Operation ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.