79624985

Date: 2025-05-16 10:33:57
Score: 1
Natty:
Report link

Basically, if you want to use functionalities provided by the NSObject class, you need to inherit from it in your class. Otherwise, it’s not necessary to include it. NSObject was the root class in Objective-C and provides basic functionalities like isEqual, description, and performSelector, among others. So, if your class requires any of those, you should inherit from NSObject. You can check the available methods in NSObject and decide based on your needs.

You can also go though NSObject document: https://developer.apple.com/documentation/objectivec/nsobject-swift.class

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Hamza siddiqui