O'Reilly logo

Programming in Objective-C 2.0, Second Edition by Stephen G. Kochan

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

8. Inheritance

In this chapter, you’ll learn about one of the key principles that makes object-oriented programming so powerful. Through the concept of inheritance, you will build on existing class definitions and customize them for your own applications.

It All Begins at the Root

You learned about the idea of a parent class in Chapter 3, “Classes, Objects, and Methods.” A parent class can itself have a parent. The class that has no parent is at the top of the hierarchy and is known as a root class. In Objective-C, you have the capability to define your own root class, but it’s something you normally won’t want to do. Instead, you’ll want to take advantage of existing classes. All the classes we’ve defined up to this point are descendants ...

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