Reputation: 17448
Despite its name, this question doesn't seem to address it.
Is it possible to use Objective-C generics with blocks?
Something like:
typedef void (^MyResultBlock<__covariant ObjectType>)(NSArray<ObjectType> *items);
...and then declaring a block:
MyResultBlock<NSNumber> blockName = ^void(NSArray<NSNumber> *items) {...};
Upvotes: 6
Views: 1050