Chapter 2. Creating an iOS application
At the end of the last chapter, you created your first iOS app. But it’s a stretch to say you “developed” an app. Xcode did the majority of the work—you just added a label and typed “Hello World.” You didn’t include any user interaction or even write any code.
In this chapter, you’ll add to your current Hello World app to make it do some basic things that will move it from an Xcode template closer to a legitimate app.
First, let’s look at the types of source code files (.h and .m). Then you’ll see how to tap into that process to get user actions and then act on them. Finally, I’ll briefly talk about notifications as a way to notify any observing objects of something.
Objective-C, like other object-oriented languages, has classes that typically encapsulate data and the actions that manipulate that data.
From “Learning Objective-C: A Primer”
The specification of a class in Objective-C requires two distinct pieces: the interface and the implementation. The interface portion contains the class declaration and defines the instance variables and methods associated with the class. The interface is usually in a .h file. The implementation portion contains the code for the methods of the class. The implementation is usually in a .m file.