I read that an object can only have one delegate at a time. But is this really so?
Let's say I create an object with a protocol, and from this object I want to collect a lot of data from several other objects. I add every object that matches my protocol to the array. Then I just go through it and call my methods for each delegate.
NSMutableArray *collectFromDelegates = [NSMutableArray alloc]init];
for(id delegate in delegateArray){
[collectFromDelegates addObject:[delegate someProtocolMethod]];
}
It is not right?
source
share