I am reading a this tutorial in which he declared a method in cell .h file
which accept a block
but did not implement the method in .m class
, he declared a private property
with same name as method
@property (copy, nonatomic) void (^didTapButtonBlock)(id sender);
what is this practice? only declaring a method in .h and making a private property in .m
I tried to do it simply like this
I created a method in .h file
-(void)xyz:(NSString*)string;
in .m file
@property (nonatomic, strong) NSString *string;
But Xcode giving warning Method definition for 'xyz' not found
Kindly tell what is going behind the scene?