Declare an ObjC parameter that's a Class conforming to a protocol

Viewed 6425

In Objective-C, it is possible to pass a class as a parameter to a method:

- (void) methodThatTakesClass:(Class)theClass;

And it is possible to pass an instance that is conforming to a protocol as a parameter:

- (void) myConformInstance:(id <MyProtocol>)theObject;

Is it possible to use the combined functionality? A method which takes a class which is conforming to a certain protocol.

2 Answers
Related