ios - Block isn't recognized unless it is defined in the same class -
i trying define instance variable block
i have 2 classes follows
@interface classa:nsobject typedef void (^ablock)(void); @end #import "classa.h" @interface classb :nsobject -(void)somemethodwithablock:(ablock)block; @end
in class b "ablock
" type not recognized unless written right above "somemethodwithablock
"
how can fix it?
you want this?
typedef void (^blocka)(void); #import <foundation/foundation.h> @interface classa : nsobject { blocka classablocka; } @end @interface classb : nsobject { blocka classbblocka; } @end
Comments
Post a Comment