Objective-C中NSObject的基class是谁?

Who is the base class of NSObject in Objective-C?

我听说 NSObject 是所有 class 派生的主要父 class。但我的问题是在派生 NSObject class 的地方是否存在任何 class?

NSObject 是主要的,但不仅是 Cocoa 的 root class。根 class 没有基 class,它是 class 层次结构的根。

另一个Cocoa根class是NSProxy

注意:以上都是Cocoa的根classes,Apple的框架,Objective-C语言本身根本没有定义任何根classes -这不同于 Java 和 C# 等语言,其中有一种语言定义了根 class 或 classes.

Apple Documentation Says

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.

还有Root Class Says

A root class inherits from no other class and defines an interface and behavior common to all objects in the hierarchy below it. All objects in that hierarchy ultimately inherit from the root class. A root class is sometimes referred to as a base class.

NSObject 和 NSProxy 是 Cocoa 中的两个根 类。 NSProxy 很少在 Cocoa 应用程序中使用,而且从不在 Cocoa Touch 应用程序中使用。