Chapter    4

Coming Events

Now that you’ve seen an iOS app in action, you might be wondering what keeps your app “alive,” so to speak. In the Shorty app, you created action functions that were called when the user tapped a button or pressed the Go key on the keyboard. You created delegate objects that received messages when certain milestones were reached, such as when a web page had problems loading or the URL shortening service responded. You never wrote any code to see whether the user had touched something or checked to see whether the web page had finished loading. In other words, you didn’t go out and get this information; your app waited for this information to come to it.

iOS apps are event-driven applications. An event-driven application ...

Get Learn iOS 8 App Development, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.