views:

124

answers:

1
+1  Q: 

Array of ImageView

hi,

I m making a Shooting game, in that I want an array of ImageViews , so that for each new level the bullets can be Disappear and the view will be shown from the initial level. SO if Any one know how to store imageviews in an array kindly tell me... regards viral..

A: 
NSMutableArray *mutableArray = [NSMutableArray array];
UIImageView *imageView = [[UIImageView alloc] initWithImage:@"Image.png"];
[mutableArray addObject:imageView];
[imageView release];
Alex Reynolds
This is fine, but i need my image view with any images, not using "initwithimage", is it possible???As there are multiple images of Bullets and i want that to clear all the images, for that i m going to create an array of imageview.So i also not having any idea that how many images will be there, so i can'e use "initwithImage". SO any other way??
iPhone Fun
This is a pretty standard way to create UIImageView instances. I'm not sure about the rest of your question. You might pick up a book on Cocoa or iPhone development to work through some smaller projects before working on this.
Alex Reynolds
why not repeat the last three lines as many times as required?
jrtc27
ok buddy, thanks for the support.
iPhone Fun