What is the purpose/use of NSObject in Objective-C? I see classes that extend NSObject like this:
@interface Fraction : NSObject
In C++ or Java, we don't use any variables like NSObject even though we have preprocessor directives and import statements in both Objective-C and Java.
Why do classes explicitly inherit from NSObject in Objective-C? What are the consequences of not declaring inheritance from NSObject?
See Question&Answers more detail:os