Why does “conformsToProtocol” not check for “required” method implementations?
问题 I am trying to enforce a "formal" @protocol , but cannot reliably test my classes/instances as to whether they ACTUALLY implement the protocol's "required" methods, vs. simply "declaring" that they conform to the protocol. A complete example of my quandary… #import <Foundation/Foundation.h> @protocol RequiredProtocol @required - (NSString*) mustImplement; @end @interface Cog : NSObject <RequiredProtocol> @end @implementation Cog @end @interface Sprocket : NSObject @end @implementation