Toolbar

Next, we look at the toolbar:

First, we have a play button, which is how we launch our app (or use cmd + R). Next, you will see a stop button, which will not be active until you run your app. This stop button (or cmd + .) is used to stop your app from running. To the right of the stop button, you will see your target (your project name) along with the current Simulator selected. If you click on your project name, you will see a screen similar to this:

This drop-down menu, which we will call the Device and iOS Simulators drop-down menu, allows you to change your Simulator type. For the purposes of our project, select iPhone7 Plus as your Simulator and then click on the play icon (or use cmd + R) to run your app. Your app will be blank and will most likely not fit the entire screen (unless you are on a large screen).

In order to see the entire screen, you can scroll right and left; however, doing this gets harder once you have elements in your app. So, an alternative to scrolling is to resize your app to fit the screen. We can do this by going to your Simulator menu and navigating to Window | Scale:

Here, you will be able to scale from 200% to 100%, or 50% (select whichever percentage allows the app to best fit your screen size).

Now, let's return to Xcode and select the stop button (or use cmd + .).

If you use the keyboard shortcut, make sure Xcode is in focus; otherwise, this shortcut will not work. I work on a 15-inch MacBook Pro Retina - therefore, when I am working on an app, I will use the iPhone 6 or iPad Air 2 simulator in landscape. They both fit nicely on my screen without having to resize either.

In addition to the Simulator, there is a Build Only Device as well as a Device section, both at the top of the Device and Simulator drop-down menu that was shown earlier in this chapter. Note that, for our purposes, you will only need a Simulator while we are building the app; however, you can add an iOS device if you would like (see under iOS Device).