problums detecting one subview to add another
im trying to put together an if statement to detect if one subview is up to put another. not sure how to go about it any help will be appreciated
[code]
-(IBAction)checkAnswer
{
if([textField.text isEqualToString: answerField.text])
{
score = score + 100;
scoreLabel.text = [NSString stringWithFormat:@"%i", score];
[self loadHints];
}
else
if (subview == bg1) {
[self addSubview:bg2];
[self loadHints];
[self addSubview:HUD];
}
if (subviews == bg2){
[self addSubview:bg3];
[self loadHints];
[self addSubview:HUD];
}
if (subviews == bg3)
{
[self addSubview:bg4];
[self loadHints];
[self addSubview:HUD];
}
if (subviews == bg4){
[self addSubview:bg5];
}
[code]
|