1
A Simple iOS Application

In this chapter, you are going to write an iOS application named Quiz (Figure 1.1). 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  Your first application: Quiz

Your first application: Quiz

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 be executed.)

Most of this book is dedicated to answering these questions.

As you go through this first chapter, you will probably not understand everything that you are doing, and you may feel ridiculous just going through the motions. But going through the motions is enough for now. Mimicry is a powerful form of learning; it is how you learned to speak, and it is how you will start iOS programming. As you become more capable, you will experiment and challenge yourself to do creative things on the platform. For now, go ahead and do what we show you. The details will be explained in later chapters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.206