The Sample App

The sample app is called LongRunningTasks. It will demonstrate a trivial long-running task on the main thread, and then several different techniques for handling the same long-running task off the main thread. The trivial long-running tasks are five loops to add 10 items each with a time delay to an array, which can then be displayed in a table view. The sample app has a table view, which will present a list of the available approaches. Selecting an approach will present a table view for the approach. The table view has 5 starting items, so it is clear when attempting to scroll whether the main thread is being interrupted by the long-running task. The long-running tasks will then create 50 more items in batches of 10 to display ...

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.