Text Editing

The first thing you are going to do is add a UITextField to the interface and set up the constraints for that text field. This text field will replace the top label in the interface that currently has the text 212.

Open Main.storyboard. Select the top label and press the Delete key to remove this subview. Select the other four labels in this view. The constraints for all these labels will turn red because they were all directly or indirectly anchored to that top label (Figure 6.2). That is OK; you will fix them shortly.

Figure 6.2  Ambiguous frames for the labels

Ambiguous frames for the labels

Open the library and drag a Text Field to the ...

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