以前に追加されたオブジェクトを置き換える配列。
array=[[NSMutableArray alloc]init];
NSNumber * index;
AppDelegate * delegate=(AppDelegate *)[[UIApplication sharedApplication]delegate];
if(delegate.counter!=NumberImages.count)
{
NSLog(@"%d",delegate.counter);
imgview.tag=delegate.counter;
NSLog(@"%ld",(long)imgview.tag);
index=[[NSNumber alloc]initWithInt:[[firstNo objectAtIndex:imgview.tag]integerValue]];
//int a=[[firstNo objectAtIndex:imgview.tag]integerValue];
NSLog(@"%@",index);
NSLog(@"%@",array);
}
[array addObject:index];
NSLog(@"%@",array);
問題は、オブジェクトを挿入すると、以前の既存のオブジェクトが置き換えられることです。
どうすればいいですか?