Code:
- (void)viewWillAppear:(BOOL)animated {
int i = 0;
int y = [xValues count];
for(i; i < y; i++)
{
UIImageView *tempView;
int xHolder = [[xValues objectAtIndex:i]intValue];
int yHolder = [[yValues objectAtIndex:i]intValue];
if((i+5)>=y)
{
tempView = [self newPieceViewWithImageNamed:@"newHits.png" atPostion:CGPointMake((xHolder),(yHolder))];
}
else{
tempView = [self newPieceViewWithImageNamed:@"Baseball.png" atPostion:CGPointMake((xHolder),(yHolder))];
tempView.alpha = .30;
}
[self.view addSubview:tempView];
}
firstPieceView = [self newPieceViewWithImageNamed:@"Baseball.png" atPostion:CGPointMake(290.,380)];
[self.view addSubview:firstPieceView];
}
Is there anyway when I leave the view to release all instances of the subviews ... there should be one but I don't know of what to call if I basically just want to start the view over with a clean slate the next time I call it ...