objective c - In Xcode, how do I know which class implement a protocol? -
i wondering in xcode, can know classes implement protocols?
i don't want use search, want identify such classes.
you can use assistant editor:
- open protocol interested in, place cursor inside
@protocoldefinition - open assistant edior (command-option-return) , drop down menu in upper left, select
protocols:

the classes implement protocol in list.
edited add info rob's comment:
note finds classes that, either in public header or in implementation declare conform protocol. if conformance protocol declared somewhere else, classes not show up.
say have protocol defined somewhere as
@protocol myprotocol <nsobject> … @end a class public header myclass.h show up:
@interface myclass : nsobject <myprotocol> also, class extended in .m file show up
@interface myobject () <someprotocol> … @end @implementation myobject … @end a class extension myclass_extension.h not show up:
@interface myobject (extension) <someprotocol> … @end
Comments
Post a Comment