It’s time to get into some details. You’ve written a couple apps and gotten some of the big picture stuff sorted out. Now it’s time to get into some line by line details. Why are there @ symbols everywhere? What’s the difference between a method and a message? What exactly do properties do? It’s time to take a quick dive into the syntax of Objective-C; then we can get back into building apps.
In Objective-C, a class is split into separate files, the .h and .m files. The .h file defines how other objects should interact with your class. It defines the properties, methods, and other attributes.
The .m file, which imports the .h, implements the internal behavior of your class. The compiler will check to make sure what is defined in your interface file has an implementation in the .m.
In Objective-C, classes are defined with interfaces in the header file. It’s where you declare whether your class inherits from anything, as well as your class’s instance variables, properties, and methods.
As Objective-C matured, more code has been moved into the implementation file as a class extension. This is the only way to define truly “private” properties and methods.