Chapter 2. Building a Guess the Number App

As mentioned in the previous chapter, learning a language is just half of the difficulty in building an app; the other half is the framework. This means that learning a language is not enough. In this chapter, we'll implement a simple Guess the Number app, just to become familiar with Xcode and part of the Cocoa Touch framework.

The app is…

Our first complete Swift program is a Guess the Number app, a classic educational game for children where the player must guess a number generated randomly.

For each guess, the game tells the player whether the guess is greater or lower than the generated number (also called the secret number).

It is worth to remember that the goal here is not to build an App Store ready ...

Get Swift: Developing iOS Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.