1 A Simple iOS Application

In this chapter, you are going to write an iOS application named Quiz. This application will show a question and then reveal the answer when the user taps a button. Tapping another button will show the user a new question (Figure 1.1).

Figure 1.1  Your first application: Quiz

Screenshot of an iOS Quiz Application, which has a text area filled with question, followed by a “Next Question” button, a text area filled with question marks, and a “Show Answer” button.

When you are writing an iOS application, you must answer two basic questions:

  • How do I get my objects created and configured properly? (Example: I want a button here that says Next Question.)

  • How do I make my app respond to user interaction? (Example: When the user taps the button, I want this piece of code to ...

Get iOS Programming: The Big Nerd Ranch Guide, 6th Edition now with O’Reilly online learning.

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