Reputation: 5634
This is how I declare my completion block as a property:
typedef void(^completionBlock)(NSManagedObjectID *companyID, NSError *error);
@property (strong, nonatomic) completionBlock block;
When calling it with
self.completionBlock(self.company.objectID,self.error)
from within a method I get a compiler error in Xcode:
Too many arguments to block call, expected 0, have 2
What Did I miss?
Thank you!
Upvotes: 0
Views: 1052
Reputation: 11597
isnt block
the variable here? so you should be going self.block(self.company.objectID,self.error)
Upvotes: 3