The @interface Section

When you define a new class, you have to tell the Objective-C compiler where the class came from. That is, you have to name its parent class. Next, you need to define the type of operations, or methods, that can be used when working with objects from this class. And, as you learn in a later chapter, you also list items known as properties in this special section of the program called the @interface section. The general format of this section looks like this:

@interface NewClassName: ParentClassName   propertyAndMethodDeclarations;@end

By convention, class names begin with an uppercase letter, even though it’s not required. This enables someone reading your program to distinguish class names from other types of variables ...

Get Programming in Objective-C, Fifth Edition 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.