20

I trying to understand class hierarchy. What are the sub classes of NSObject. Is there any graphical representation of the hierarchy?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
mind
  • 209
  • 1
  • 2
  • 9
  • The set of potential `NSObject` subclasses is not finite - you can add custom ones as much as you want. Are you asking for a diagram for the Cocoa Touch classes? – Georg Fritzsche Jul 24 '10 at 00:08

5 Answers5

2

You can explore the hierarchy in the hierarchical view of the Symbols navigator in a Xcode project. Be sure to de-select the document icon below to display all symbols and not just those defined in your project.

enter image description here

atineoSE
  • 3,597
  • 4
  • 27
  • 31
0

Here is a diagram explaining about NSObject class references but its not the one. There are so many things to know about NSObject. On the other hand its not finite, means you can add your custom classes also.

iOS NSObject class reference

Hope this helped.

Thanks.

onCompletion
  • 6,500
  • 4
  • 28
  • 37
0

The class browser under Project>Class Browserwill display a hierarchal view of all the classes. There are a lot of them.

TechZen
  • 64,370
  • 15
  • 118
  • 145
0

You can use Xcode

Show the Navigator -> Show  the Symbol Navigator
//or 
Command + 3

Hierarchical -> Classes -> NSObject

You can use Filter field or Navigate -> Reveal in Symbol Navigator. Sometimes Filter field is buggy that is why you should repeat actions

yoAlex5
  • 29,217
  • 8
  • 193
  • 205
0

NSObject is the root class of most Objective-C class hierarchies, from which subclasses inherit a basic interface to the runtime system and the ability to behave as Objective-C objects.

https://developer.apple.com/documentation/objectivec/nsobject

I found this this diagram on Google showing the inheritance relationships.

A comprehensive blog is written by Chris (Just read Chapter#12):

https://codewithchris.com/swift-tutorial-complete/#uikit Chapter 12