O'Reilly logo

Learn Cocoa Touch for iOS by Jeff Kelley

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

Chapter    8

Managing What Happens When

So far in this book, you’ve made things happen in a fairly regular manner. You send a message to an object, the method corresponding to that message selector runs and then returns, and your code continues. This only scratches the surface of what’s possible with Objective-C and Cocoa Touch; you can run code later, run two pieces of code at the same time, or run nothing at all until something else happens. In this chapter, we’ll discuss the specifics of how you manage when your code runs, as well as delving into why it matters. We’ll cover writing code to take advantage of the latest multicore processors, using timers to repeat the execution of code over time, and run loops, Apple’s efficient way to wait ...

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