In iOS UIKit, UIControl is the base class for control objects such as buttons and sliders.
Available in iOS 2.0 and later in UIKit. The main role of UIControl is to define an interface and base implementation for preparing action messages and initially dispatching them to their targets when certain events occur.
The UIControl
class also includes methods for getting and setting control state—for example, for determining whether a control is enabled or highlighted—and it defines methods for tracking touches within a control. These tracking methods are overridden by UIControl
subclasses.
You cannot use the UIControl
class directly to instantiate controls. It instead defines the common interface and behavioral structure for all its subclasses.