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 ...

Get Objective-C Quick Syntax Reference 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.