Root class of all classes in Swift? [duplicate]
问题 This question already has answers here : Why is there no universal base class in Swift? (2 answers) Closed 2 years ago . The Apple's developer documentation says: NSObject is The root class of most Objective-C class hierarchies, from which subclasses inherit a basic interface to the runtime system. I wonder what is the root class of all classes in Swift in the example below: class MyClass { .... } 回答1: Swift classes do not inherit from a universal base class. Classes you define without