Changes

An Overview of Objective-C Object Oriented Programming

12 bytes added, 19:14, 14 October 2009
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''
{
:::''ClassMembers'';
}
''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.