O'Reilly logo

The Complete Idiot's Guide® To iPad and iPhone App Development by Troy Brant

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

Time to Code

When the user slides the slider, toggles the switch, or taps the segmented control, you need to update the resultLabel so it reflects changes the user just made. To edit the font name and font size of the label, you will use the UIFont class. Using the UIFont class, you can control font properties like the font family, font size, and whether to bold or italicize a particular string. However, to control capitalization, you use built-in methods on the NSString class.
The UILabel class has two properties for manipulating its appearance. You will use the text property to modify the NSString object and the font property to modify the UIFont object.

updateText

To get started, let’s write a helper method that updates the text property ...

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