Despite its name, this question does not seem to affect it.
Is it possible to use Objective-C generics with blocks?
Sort of:
typedef void (^MyResultBlock<__covariant ObjectType>)(NSArray<ObjectType> *items);
... and then declare a block:
MyResultBlock<NSNumber> blockName = ^void(NSArray<NSNumber> *items) {...};
source
share