Adding a New View

To improve your app, you can add another view that this view will transition to. Before you do anything else, though, change the label of the button to say Go. In your component search, look for and add two text fields and a label. Place the two text fields, spaced apart, below the Go button and place the label in the middle, with the text +. You can add a bunch of constraints to each item. You can see all the constraints added in Figure 12.8, as well as the layout on the right. You can add these constraints manually by Control+dragging from each item and choosing the constraint. If you resize anything after a constraint is applied, you must update the constraint. As soon as you resize, you see lines turn orange, which means ...

Get Learning Swift™ Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.