Working with Action Messages
When a user interacts with an object, it sends an action message to an object in your code—usually the current view controller.
iOS includes a standard repertoire of action messages. The list is defined in a class called UIControl and appears in Figure 8.1. Buttons, sliders, text fields, and other standard UI objects are all subclasses of UIControl, so they inherit the items in this list. Most of this list is built into Interface Builder, so you can access it directly when you design your UI.
8.1 A first look at UIControl messages.
It makes no sense for a slider to send a UIControlEventEditingDidBegin message, because sliders aren’t editable. Don’t be confused by this. The same list is available for all objects, but that doesn’t mean all objects can send every kind of message. It’s up to you to work with the messages that make sense for each kind of control.
An enum is simply a list of named items. Internally, each name in the list is associated with a value. This makes it possible to use names in your code instead of numbers—which makes your code easier to read. You’ll often see message names and constant values defined in this way. (The numbers ...