Skip to content

Instantly share code, notes, and snippets.

@dodikk
Last active August 29, 2015 13:57
Show Gist options
  • Save dodikk/9910195 to your computer and use it in GitHub Desktop.
Save dodikk/9910195 to your computer and use it in GitHub Desktop.
@protocol MyBlockProtocol;
typedef id<MyBlockProtocol>(^MyFactoryMethodBlock)( NSString* )objectId
#import <MyLibrary/FactoryBlock.h>
@protocol MyBlockProtocol
-(MyFactoryMethodBlock)factoryMethodBlock;
// having a conflict
-(id<MyBlockProtocol>)createInstanceById:( NSString* )instanceId;
// what's wrong here?
-(instancetype)createInstanceById_2:( NSString* )instanceId;
@end
#import <MyLibrary/MyBlockProtocol.h>
@protocol MyChildBlockProtocol<MyBlockProtocol>
-(MyFactoryMethodBlock)factoryMethodBlock;
// having a conflict
-(id<MyChildBlockProtocol>)createInstanceById:( NSString* )instanceId;
// what's wrong here?
-(instancetype)createInstanceById_2:( NSString* )instanceId;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment