Chapter 6. Monitoring events and actions

 

This chapter covers

  • The SDK’s event modeling
  • How events and actions differ
  • Creating simple event- and action-driven apps

In the previous chapter, you learned how to create the basic view controllers that fulfill the controller role of an MVC architectural model. You’re now ready to start accepting user input, because you can send users to the correct object. Users can interact with your program in two ways: by using the low-level event model or by using event-driven actions. In this chapter, you’ll learn the difference between the two types of interactions, and how to implement them. Then we’ll look at notifications, a third way that your program can learn about user actions.

Of these three models, events provide the lowest-level detail and ultimately underlie everything else (they’re essential for sophisticated programs), so we’ll begin with events.

6.1. An introduction to events

We briefly touched on the basics of event management in chapter 2. But as we said at the time, we wanted to put off a complete discussion until we could cover events in depth; we’re now ready to tackle that job.

6.2. A touching example: the event reporter

6.3. Other event functionality

6.4. An introduction to actions

6.5. Adding a button to an application

6.6. Other action functionality

6.7. Introducing notifications

6.8. Summary