-1

Anyone can tell me when we can create a class without subclassing NSObject?

1 Answers1

0

"NSObject is the root class of most Objective-C class hierarchies. Through NSObject, objects inherit a basic interface to the runtime system and the ability to behave as Objective-C objects."

As this would suggest, you need to subclass NSObject for types introduced in your code whenever instances of that type need to behave like an Objective-C object (or the class itself, in some rarer cases).

Priya
  • 725
  • 5
  • 10
Mark Bell
  • 3,370
  • 1
  • 7
  • 14