I'm trying to add multiple instances of UIImageView(s) to an NSMutableArray of NSMutableDictionar(ies).
I am doing this, to be able to go back and pull out the UIImageView reference, to change the position of these images.
It seems that, when I pull the info out of the Dictionary, that it only returns a null pointer...
Any suggestions on how I should implement this? There may be a way easier method to store a list of n images and be able to reference them later....
// (for i = 0 to 30)
UIImageView *newBall = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ball.png"]];
newBall.center = CGPointMake (arc4random() % 280 + 20, arc4random() % 440 + 20);
[self.view addSubview:newBall];
NSMutableDictionary *dictBall = [[[NSMutableDictionary alloc] init] autorelease];
[dictBall setValue:newBall forKey:@"imgBall"];
// the dictionary is then added to the array
[newBall release];
// end for loop
(I'm using a Dictionary, because I also store a dy/dx value for rate of change in movement)