One of the method signature in objective-c code
-(void)funcName: (const NSString *)name parameter: (void(^)(ClassName *input)) obj
The class definition header file is
@interface ClassName : NSObject
@property NSObject *data;
@end
Now how to prepare and pass the second paramater?
you can pass a block as a parameter for instance like:
[... funcName:@"" parameter:^(ClassName * input) {
NSLog(@"I'm inside the block!");
}];
void(^myBlock)(ClassName *) = ^(ClassName * input) {
NSLog(@"I'm inside the block!");
};
[... funcName:@"" parameter:myBlock];
both options can work, you can use whichever makes more sense to you.