Obj-C blocks are something I'm just using for the first time recently. I'm trying to understand the following block syntax:
In the header file:
@property (nonatomic, copy) void (^completionBlock)(id obj, NSError *err);
In the main file:
-(void)something{
id rootObject = nil;
// do something so rootObject is hopefully not nil
if([self completionBlock])
[self completionBlock](rootObject, nil); // What is this syntax referred to as?
}
I appreciate the assistance!
if( self.completionBLock) self.completionBlock(rootObject, nil);
– zpasternack Sep 21 '12 at 8:01