Adding the Hello World Label

By default, Xcode creates a project that is set to run on the iPhone or iPad; when you create a project, the next one uses your previous settings. New projects start with all the classes and supporting files you need to create your application. This includes a basic home screen with no content. When you run a new project, it shows a blank white screen.

The quickest way to see Hello World on the screen is to add a label to your project. With your project open, follow these steps (see Figure 2-6):

1. Check that the project is set to run in the simulator by looking at the right side of the scheme popup menu (area 2 in Figure 2-5.) If the right-hand side does not say “iPhone Retina (4-inch),” click on that side of the ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming 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.