6. Object-Oriented Programming

In this chapter, we take a deeper look at object-oriented programming in Objective-C.

We start by using access specifiers@public (the default), @private, and @protected—to set the access allowed to members (both methods and data members such as variables) of an object.

We also explore how to use class variables—that is, variables that are associated with a class, not just an object (in fact, all objects of that class share the class variables).

Polymorphism refers to using the same code for different kinds of objects, and we see how that works in Objective-C, too.

In addition, we explore how to check whether an object supports a particular method before trying to use that method, how to determine the class of ...

Get Objective-C: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.