Discover subclasses of a given class in Obj-C

后端 未结 5 1266
北海茫月
北海茫月 2020-12-16 21:15

Is there any way to discover at runtime which subclasses exist of a given class?

Edit: From the answers so far I think I need to clarify a bit more

5条回答
  •  醉梦人生
    2020-12-16 21:40

    There's code in my runtime browser project here that includes a -subclassNamesForClass: method. See the RuntimeReporter.[hm] files.

提交回复
热议问题