-1

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.

  • 6
    Possible 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 Answers1

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.

https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Inheritance.html

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