Is there a way to indicate to the compiler that a class object conforms to a protocol?
As I understand, by creating +(void)foo
class methods, an instance of that class object will have those methods as instance methods. So, as long as I create +(void)foo
methods for all required protocol methods, I can have a class object act as a delegate.
My problem of course is that in the class's header file, I only know how to indicate that instances of the class conform to the protocol (as is typically the case). So, the best I've figured out is to cast the class object like so:
something.delegate = (id<SomethingDelegate>)[self class]
Any ideas?
Related, but different: ObjC: is there such a thing as a "class protocol"?