views:

280

answers:

2

hi I need to create around 50 uiimageview so that i am using a for loop for that and also assigning images for that view. its working fine with simulator but when i am running my application with device(iphone 3.0) it is not showing some images and some time its showing all the images, so that i am not able to find why its behaving such type of behavior. can any one suggest me the way so that i can see images all the time i run my application.

regard akd

A: 

thanks Shaggy for reply... here is my code which is creating uiimageview which i am using inside viewdidload method.

imageVwArr = [[NSMutableArray alloc] init];

for(int i = 0; i < 52; i++)                                
{
UIImageView *imgVw = [[UIImageView alloc] initWithImage:[[imagesArr objectAtIndex:i]objectForKey:@"image"]];
 [imgVw setUserInteractionEnabled:YES];
 [imgVw setTag:i];
 [imgVw setFrame:closeDeckFrame];

 [imageVwArr addObject:imgVw];
 [imgVw release];
 [self.view addSubview:imgVw];
}
Why do you have [imgVw release] before [self.view addSubview:imgVw]? Try swapping the two statements.
Alex Reynolds
A: 

hi
i am new to iphone

i have also same situation how i rectify it.. i want also creating uiimageview dynamically based on the image file count

muthiah