DMH
DMH

Reputation: 192

Multiple Interfaces declared in header

Can anyone explain to me why Apple has various interfaces declared in NSArray.h?

And they declare

@interface NSArray: something something

and then they have this

@interface NSArray (NSExtendedArray)

Why do they use the NSExtendedArray in parenthesis? Thank you.

Upvotes: 0

Views: 59

Answers (1)

i_am_jorf
i_am_jorf

Reputation: 54640

The category—which is named by the thing inside the parenthesis—defines a logical grouping of methods to extend the class. Using categories those methods can be in other header files as well. For example, the NSString path extensions.

Upvotes: 1

Related Questions