0 votes
in Technology by (1.7m points)
What is an extension in Objective-C?

1 Answer

0 votes
by (1.7m points)

Extensions are actually categories without the category name. It’s often referred as anonymous categories. The syntax to declare a extension uses the @interface keyword, just like a standard Objective-C class description, but does not indicate any inheritance from a subclass. Instead, it just adds parentheses, as shown below

@interface ClassName ()

@end

...