Concurrent Operations

Run the sample app, and select the row called Operation Queue-Concurrent. The five initial items in the table view are visible, and they are scrollable while the long-running tasks are being processed (view the debugging console to confirm that they are being processed while scrolling the table view). After the tasks are completed, the additional rows become visible.

Examine the ICFOperationQueueConcurrentViewController in the sample app source code to see how this approach is set up. Before operations are added, the operation queue needs to be set up in the viewDidLoad: method:

self.processingQueue = [[NSOperationQueue alloc] init];

This approach sets up the initial data in exactly the same ...

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.