Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning iOS UI Development

You're reading from  Learning iOS UI Development

Product type Book
Published in Dec 2015
Publisher
ISBN-13 9781785288197
Pages 196 pages
Edition 1st Edition
Languages

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, meaning that you will get all the functions available for the views and your control can be directly attached as a subview of the current user interfaces.

The functionalities provided by the UIControl class are obviously all about control behaviors...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}