March 2014
Intermediate to advanced
672 pages
40h 11m
English
There’s more to UIControl instances than frames and target-action. All controls inherit from the UIView class. This means you can use UIView animation blocks when working with controls just as you would with standard views. Recipe 2-2 builds a toggle switch that zooms itself whenever a user touches it and returns to its original size when the touch leaves the control.
This recipe creates a livelier interaction element that helps focus greater attention on the control in question.
Note
To add a little flare to your instances, note that buttons support delicious NSAttributedString values via setAttributedTitleForState:. Recipe 2-4, which follows later in this chapter, updates a segmented control’s text color ...
Read now
Unlock full access