O'Reilly logo

Objective-C Quick Syntax Reference by Matthew Campbell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5

image

Objects

Objects Defined

Objective-C objects are entities that contain both behavior and attributes in one place. Behaviors are coded in methods while attributes are coded in properties. Objects can also include private instance variables. Private instance variables are used when data storage is required, but not needed to be shared.

NSObject Class

NSObject is the root class in Objective-C. A class is a definition that has all the code needed to make an object’s methods and properties work. NSObject is called the root class because it has all the code needed to make objects work in Objective-C and every other class inherits from the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required