April 2020
Intermediate to advanced
528 pages
15h 40m
English
Now let’s update the segmented control to change the map type when the user taps on a segment.
A UISegmentedControl is a subclass of UIControl. You worked with another UIControl subclass in Chapter 1: the UIButton class. Controls are responsible for calling methods on their target in response to some event.
Control events are of type UIControl.Event. Here are a few of the common control events that you will use:
A touch down on the control.
A touch down followed by a touch up while still within the bounds of the control.
A touch that causes the value of the control to change.
Read now
Unlock full access