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
  • PrintPrint
Share this Page URL
Help

17. Your First Class > Multiple files

Multiple files

Notice that your project now has executable code in two files: main.m and Person.m. (Person.h is a declaration of a class, but there is no executable code in it.) When you build the project, these files are compiled separately and then linked together. It is not uncommon that a real-world project will consist of hundreds of files of C and Objective-C code.

You can also link in libraries of code. For example, you might find a great library for parsing data from digital telescopes on the Internet. If your program needed this capability, you would compile that library and add it to your project. When Xcode built your program, it would link in all the functions and classes defined in that library.


  

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