我有函数,我将块变量blockIfLoadingImageFromServer添加到数组:
- (UIImage *)getImageWithblockIfLoadingImageFromServer:(void (^)(UIImage *imageCompleted))blockIfLoadingImageFromServer
{
[array addObject:blockIfLoadingImageFromServer];
}
然后我想得到这个变量,但我不知道如何。我试过:
(void (^)(UIImage *imageCompleted))blockIfLoadingImageFromServer = [array objectAtIndex:0];
void (^)(UIImage *imageCompleted) *blockIfLoadingImageFromServer = [array objectAtIndex:0];
但这会产生错误(语法错误)。我怎样才能做到这一点?