Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. Building your first iOS appli... > Using Xcode to develop a simple Coin...

1.3. Using Xcode to develop a simple Coin Toss game

Although you might have grand ideas for the next iTunes App Store smash, let’s start with a relatively simple application that’s easy to follow without getting stuck in too many technical details, allowing the unique features of the development tools to shine through. As the book progresses, we dig deeper into the finer points of everything demonstrated. For now the emphasis is on understanding the general process rather than the specifics of each technique.

The application you develop here is a simple game that simulates a coin toss, such as is often used to settle an argument or decide who gets to go first in a competition. The user interface is shown in figure 1.2 and consists of two buttons labeled Heads and Tails. Using these buttons, the user can request that a new coin toss be made and call the desired result. The iPhone simulates the coin toss and updates the screen to indicate if the user’s choice is correct.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial