7. More on Classes
In this chapter you'll continue learning how to work with classes and write methods. You'll also apply some of the concepts you've learned in the previous chapter, such as program looping, making decisions, and working with expressions. First, we'll talk about splitting your program into multiple files to make working with larger programs easier.
Separate Interface and Implementation Files
It's time to get used to putting your class declarations and definitions in separate files. Typically, a class declaration (that is, the @interface
section) is placed in its own file, called class
.h
. The definition (that is, the @implementation
section) is normally placed in a file of the same name, using the extension .m
instead. So, let's ...
Get Programming in Objective-C now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.