34,333
edits
Changes
→Declaring an Objective-C Class Implementation
An Objective-C class is defined in terms of an ''interface'' and an ''implementation''. In the interface section of the definition we specify the base class from which the new class is derived and also define the members and methods that the class will contain. The syntax for the implementation section of a class is as follows:
<tt>
@interface ''NewClassName'': ''ParentClass''
{
}
''ClassMethods'';<br>
@end
</tt>
The ''ClassMembers'' section of the implementation defines the variables that are to be contained within the class (also referred to as ''instance variables''). These variables are declared in the same way that any other variable would declared in Objective-C.