mind
mind

Reputation: 209

Class hierarchy of NSObject

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

Upvotes: 20

Views: 24242

Answers (5)

Muhammad Faraz Ali
Muhammad Faraz Ali

Reputation: 970

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

Upvotes: 1

yoAlex5
yoAlex5

Reputation: 34431

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

Upvotes: 0

atineoSE
atineoSE

Reputation: 4117

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

Upvotes: 2

onCompletion
onCompletion

Reputation: 6650

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.

Upvotes: 0

TechZen
TechZen

Reputation: 64428

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

Upvotes: 0

Related Questions