O'Reilly logo

Anyone Can Create an App: Beginning iPhone and iPad programming by Wendy L. Wise

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Capturing users’ actions: adding buttons

This chapter covers

  • Creating an app with a button
  • Buttons and how to use them
  • Changing labels

You’re going to create another app in this chapter. This one will have a button the user can tap. Buttons are used throughout iPhone and iPad apps to allow the user to do some kind of action, such as make a phone call. Each number on the phone number screen is a button, for example, and the call and hang-up buttons are buttons too.

In this chapter you’ll add a label and a button to the app and write some code. The code you write will make the button change what the label displays. You’re also going to change how the label looks by implementing cosmetic changes.

Looking at the code ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required