Buttons, Controllers, and Code
In This Chapter
• Adding a controller to handle button taps
• Hooking up the controller with the interface
• Writing action methods and updating outlets
For several months in 2009, an app called “Do Not Press the Red Button” was the top-selling iPhone app. The premise of the app is simple: there’s a big, red button in the middle of the screen, and you’re not supposed to press it. Of course no one can resist that, and so you tap the button. A message is displayed warning you that if you tap the button just one more time, the world will come to an end. So, of course, you tap the button again, but instead of the end of the world, you get another warning. After enough taps, something dramatic happens, ...