Trj
Trj

Reputation: 677

Finding subclasses of a class in objective-c

In the Apple docs there are a lot of classes that are meant to be subclassed or abstract classes. How can i find which classes are subclass of a given class?

For instance: If i'm looking at UIDummyClassAbstract, how can i find all classes that are subclassing UIDummyClassAbstract?

It would help to get a better overview

Upvotes: 9

Views: 2152

Answers (2)

Dan Rosenstark
Dan Rosenstark

Reputation: 69787

Although it is not a free product, if you were to use AppCode instead of Xcode, this stuff is relatively easy, even for classes that you don't own (like in your example).

Search for Usages

enter image description here

Upvotes: 0

Vladimir
Vladimir

Reputation: 170849

It is not exactly in Documentation but you can inspect class hierarchy this way:

  1. Open "Symbol Navigator" (look for enter image description here icon)
  2. Toggle "Show only project defined symbols" option off (enter image description here icon in the bottom at the window)
  3. You can inspect class tree now :)

enter image description here

Upvotes: 17

Related Questions