O'Reilly logo

Xcode 6 Essentials by Jayant Varma

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 basics

At the very base, all visual elements are derived from the UIView object described in UIKit. A custom control is basically a custom class that is derived from a UIView class and is responsible for displaying itself visually on the screen.

Some controls such as the stock ticker will display the data based on the stocks that you might want to track. In the case of a progress bar, however, you might want to set the progress and then also retrieve the progress status at some point.

Creating a class

First, let us start with the basics; we will create a class and give it some properties. Since this is a visual class, we will need to derive it from UIView. Perform the following steps:

  1. Start a new project and name it customControl1:
  2. Click on Main.storyboard ...

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