As Brad Larson noted, this is for the Mac, not for the iPhone.
Yes, NSMutableArray is the best option. However, arrays store objects, and the center is a structure!
One solution is to wrap around the center structure using NSValue :
yourArray = [NSMutableArray arrayWithCapacity:2]; //Don't worry, capacity expands automatically [yourArray addObject:[NSValue valueWithPoint:image.center]]; //later [[yourArray objectAtIndex:whatevs] pointValue];
(This is very similar, for example, to int packaging with NSNumber for storage in an array.)
source share