What is NSObject?
NSObject is the root class inherited by most Objective-C classes; it has no parent class. Through NSObject, other classes inherit some basic interfaces with the Objective-C language compiler system, and obtain the ability to behave as an object in its instance.
Although NSObject is not a strict abstract class, it is actually a class. However, in addition to being a simple class, NSObject can hardly perform any useful operations. Add any attributes (attributes) for your program and develop the implementation logic. You must create one or more classes inherited from NSObject or the parent class inherited from NSObject ).
NSObject adopts the NSObject protocol (Protocol) (see "Root Class-and protocol" (page 67th )). NSObject protocol (protocol) can be used by multiple root classes. For example, NSProxy does not inherit NSObject from another root class, however, NSObject protocol is also used. Therefore, in Objective-C, NSObject has interfaces and functions similar to the NSObject class.