Classes in Objective-C
All Objective-C classes are split into two files: the interface and the implementation. The interface is where you declare your class and the instance variables it will contain. The interface is also where you declare all the public methods the class will present to the world. You only include the method header, not its body, in the interface.
The implementation, on the other hand, is where you write the methods you declared in the interface. You can also define private methods in the implementation file, simply by not including those method headers in the public interface file.
Let’s look at an example. Here is the Shape.h interface file for a simple Shape class:
Let’s break it down line by line: