Nat! bio photo


Senior Mull

Twitter Github Twitch

@protocol on category at runtime only exists if the category implementation exists

This is somewhat obvious, but anyway:

@protocol Fooble

@interface Foo : NSObject

@implementation Foo

@interface NSObject ( Fooble) < Fooble>

@implementation NSObject ( FoobIe)

void  main()
   printf( "%s", [[Foo new] conformsToProtocol:@protocol(  Fooble)] ? "YES" : "NO");

will respond with NO, because of the typo in @implementation NSObject ( FoobIe) .