views:

25

answers:

2

Is it possible to store multiple objects for a single index in an NSArray?

+1  A: 

Sure there are many ways to do this with the most common being to assign a dictionary to each array element

ennuikiller
A: 

Yes, you probably just want to have an NSArray of NSMutableArrays. You can then call something like this:

[[array objectAtIndex:2] addObject:obj];

or

[[array objectAtIndex:2] objectAtIndex:1];
cool_me5000
Instead of addObject shouldn't you use setObject: forKey:? Should objectAtIndex be objectForKey?
awakeFromNib
`setObject:forKey:` is for dictionaries, cool_me5000's answer is using two arrays
imaginaryboy