The UIControl Class

In iOS, controls refer to the members of a library of prebuilt objects designed for user interaction. Controls consist of buttons and text fields, sliders and switches, along with other Apple-supplied objects. A control’s role is to transform user interactions into callbacks. Users touch and manipulate controls and in doing so communicate with your application.

The UIControl class lies at the root of the control class tree. Controls are subclasses of UIView, from which they inherit all attributes for display and layout. The subclass adds a response mechanism that enhances views with interactivity.

All controls implement ways to dispatch messages when users interact with their interface. Controls send messages using a target-action ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.