In my application, I will have to return "class" as return type:
.m:
+ (Class) getParserClass {Return to [NCCRCparcer Class]; } NCCurrencyParser.m:
@interface NCCurrencyParser NSObject & lt; NCParser & gt; @protocol NCParser + (NSNumber *) Parser number: (NSN * *) Number; In the caller mode, :
class parserClass = [application getParserClass]; [Parser class parser number: 1.0]; But then the compiler gives me an error that parserClass can not respond to parseNumber. How do I classify some protocols like: Just do whatever you want Generally, for any other object protocols, i.e.: and class & lt; Ncparser & gt;
Strong> first class objects, and any other objective-object such as protocol can apply. (ID, NSOBEX *, ...)
+ (class
class
Comments
Post a Comment