I have this declared on the interface
void (^ soc)(NSString *type, BOOL configured);
and
@property (nonatomic, assign) BOOL serviceOK;
Then inside a method on .m I have this:
soc = ^(NSString *type, BOOL configured){
// ...
};
// other blocks defined here
And then this:
NSMutableArray *arrayBlocks = [[NSMutableArray alloc] initWithObjects:
[block1 copy],
[soc(typeOne, self.serviceOK) copy],
[block3 copy],
[block4 copy],
nil];
I have an error on the soc line with the message bad receiver type void (what ???)
If I simply run this:
soc(typeOne, self.serviceOK);
it works fine, but if I include it in the array it complains. Any help appreciated.