O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Aaron Hillegass, Christian Keur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4 Text Input and Delegation

WorldTrotter looks good, but so far it does not do anything. In this chapter, you are going to add an instance of UITextField to WorldTrotter. The text field will allow the user to type in a temperature in Fahrenheit that will then be converted to Celsius and displayed on the interface (Figure 4.1).

Figure 4.1  WorldTrotter with a UITextField

WorldTrotter with a UITextField

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required