Which is the base class and root class in iOS and what is that and how to use it in app? I know the root class is NSObject in iOS.
Asked
Active
Viewed 866 times
-1
-
6Possible duplicate of [What is the difference between Root Class & Base Class in Objective-C?](https://stackoverflow.com/questions/17016943/what-is-the-difference-between-root-class-base-class-in-objective-c) – Abslen Char Mar 28 '18 at 07:11
-
https://stackoverflow.com/questions/6203467/default-base-class-for-objective-c-classes & https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/RootClass.html – Vinaykrishnan Mar 28 '18 at 07:13
1 Answers
1
First of all iOS is a system not a language.
In Swift there is no universal base class :
Swift classes do not inherit from a universal base class. Classes you define without specifying a superclass automatically become base classes for you to build upon.
cf. Root class of all classes in Swift?
In Objective-C most objects inherit from NSObject
, but there is another root class: NSProxy
.

Zaphod
- 6,758
- 3
- 40
- 60