What is “category” in Objective-C? What is “category” in Objective-C? objective-c objective-c

What is “category” in Objective-C?


A category allows you to add methods to an existing class—even to one for which you do not have the source.

Categories are a powerful feature that allows you to extend the functionality of existing classes without subclassing

Check the apple doc for the Category in Objective-C


There is a section in the Objective-C 2.0 programming Language document about Categories and Extensions.

As you are just getting started it's a good doc to have on hand to look things up.

There is also a section on Categories in the Cocoa Core Competencies document, which is easier to get started with, and also has a lot of useful information for the beginner.