Can I store ^block in a dictionary or an array?
I need to listen to a server notification which I need to provide a block to handle the notification, and in my project several view controllers all want to hear the notification, so I made a generic notification manager, which has its own block for handling server notification and it has an array of delegates, so in the manager's block:
- (^)(NSString *message){
for (delegate in allDelegates)
{
delegate.handlerBlock(message);
}
}
but can I store blocks in a collection?