Chapter 5. Creating classes

 

This chapter covers
  • Creating custom Objective-C classes
  • Adding instance variables
  • Adding class and instance methods
  • Adding properties
  • Implementing init and dealloc

 

The real power of object-oriented programming comes into play when you start to create your own custom objects that perform application-specific tasks, and this is what we explore in this chapter. By creating a custom class, you can encapsulate a common set of functionality into a reusable component that you can use repeatedly throughout an application (or even a set of applications).

To put the concepts into context, we concentrate on updating the Rental Manager application to use object-oriented design principles, replacing the Rental-Property ...

Get Objective-C Fundamentals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.