3 Views and the View Hierarchy

Over the next five chapters, you are going to build an application named WorldTrotter. When it is complete, this app will convert values between degrees Fahrenheit and degrees Celsius. In this chapter, you will learn about views and the view hierarchy through creating WorldTrotter’s UI. At the end of this chapter, your app will look like Figure 3.1.

Figure 3.1  WorldTrotter

Screenshot of the Prototype of the WorldTrotter user interface. The interface screen reads 212 degrees Fahrenheit is really 100 degrees Celsius.

Let’s start with a little bit of the theory behind views and the view hierarchy.

View Basics

Recall from Chapter 1 that views are objects that are visible to the user, like buttons, text fields, and sliders. ...

Get iOS Programming: The Big Nerd Ranch Guide, 6th Edition 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.