2. Building and Using Controls

The UIControl class is the basis for many iOS interactive elements, such as buttons, text fields, sliders, and switches. These view objects have more in common than just deriving from their ancestor class. Controls all use similar layout paradigms and target-action triggers. Learning to create a single control, no matter how specialized, teaches you how all controls work. Controls may appear visually unique and specialized but use a single design pattern. This chapter introduces controls and their use. You’ll discover how to build and customize controls in a variety of ways. This chapter introduces a range of control recipes—from the prosaic to the obscure—you can reuse in your apps.

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.