When to Use Subclassing in iOS 6 App Development

By Neal Goldstein, Dave Wilson

Part of iOS 6 Application Development For Dummies Cheat Sheet

Subclassing allows you to customize behaviors while you’re developing your iOS application. Keep the following points about subclassing in mind as you develop your app:

  • In the first stage, you create a new class, called a subclass, that inherits properties from another (super) class

  • In the second stage, you add properties as needed for your iOS application.

  • In general, you’ll want to subclass the following

    • UIView, to create your (more complex) content views, which you may fill with controls, graphics, and so on.

    • UIViewController, to manage the content views and connect them to the model.

    • NSObject, to create Model views and delegates.