Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Chapter 9: Controlling Multitasking
There are two broad meanings of “multitasking” in iOS. First, it refers to running multiple applications at the same time by allowing one or more applications to run “in the background.” Second, it refers to when a single application runs multiple operations simultaneously. Both are important parts of many iOS applications, and this chapter discusses both.
You learn the best practices for multitasking and discover the major iOS frameworks for multitasking: run loops, threads, operations, and Grand Central Dispatch (GCD). If you are familiar with thread-based multitasking from other platforms, you learn how to reduce your reliance on explicit threads and make the best use of iOS’s frameworks that avoid threads or handle threading automatically. Perhaps most importantly, you learn how to give your users the illusion of multitasking without wasting system resources.