I’m using NSOperationQueue in my app and i want to set multiples arguments to my operation how can i do that?
NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(methodCall) object:nil];
[queue addOperation:operation];
[operation release];
You will have to create an array or dictionary with the data you need.
Ex:
and in
- (void)methodCall:(NSDictionary *)argumentDictionaryyou can use the objects and values stored in that dictionary.