O'Reilly logo

Learning iOS UI Development by Yari D'areglia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The UIControl class

There are many different starting points for the creation of your component. If you take a look at some of the custom controls available online, you will find that you can even start from a UIView subclass and draw the control parts in its drawRect method. There isn't a "right way to do it", but in order to be consistent with UIKit controls and have some advantages during the control's implementation, starting with the UIControl class is definitely a good choice.

This class provides an interface for the common structure of a control. You cannot use it directly, but it has to be subclassed by overriding some main methods if you want to implement your custom functionalities.

The UIControl class is, in turn, a subclass of UIView ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required