Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Basic Objective-C > Declaring a Class

5.6. Declaring a Class

I’m going to show you some examples of how to create basic classes, but at this point you can just follow along and take in the examples. You don’t need to actually create the files until the final example at the end of the chapter.

An Objective-C class is usually made up of two files. The instance variables and methods are declared in the ClassName.h file, and the method implementations are in the ClassName.m file. Here’s what the Photo.h header file looks like for the Photo class:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial