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 10. While you’re doing that...

This chapter covers

  • The while control statement
  • The switch statement
  • Writing a “How many fingers am I holding up?” app

You learned all about the if statement and how it can help control the flow of your application in chapter 9. The if statement allows you to evaluate variables and then execute different code depending on the outcome of the evaluation. Now you know two ways to control the flow: by the user interacting with your app (by tapping a button, for instance) and by the if statement.

There are a lot of other ways to control the flow of your app, though. I’m going to introduce you to a few more now. This chapter will talk about the while statement and the switch statement, and you’ll write ...

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