-(IBAction)choiceOne:(id)sender{
if ([Choice2 isSelected]) {
[Choice2 performSelector:@selector(finishHighlight:) withObject:sender afterDelay:0];
score = score -4;
score = score+8;
NSLog(@"Score updated %i touched from choice 1 ",score);
[self performSelector:@selector(doHighlight:) withObject:sender afterDelay:0];
checker =1 ;
}else if ([Choice3 isSelected]) {
[Choice3 performSelector:@selector(finishHighlight:) withObject:sender afterDelay:0];
score = score -2;
score = score+8;
NSLog(@"Score updated %i touched from choice 1 ",score);
[self performSelector:@selector(doHighlight:) withObject:sender afterDelay:0];
checker =1 ;
}
else {
score = score+8;
NSLog(@"Score updated %i touched from choice 1 ",score);
[self performSelector:@selector(doHighlight:) withObject:sender afterDelay:0];
checker =1 ;
}
}
I have to finish highlight’s from selected button if any other button is pressed from menu
- (void)doHighlight:(UIButton*)b {
[b setHighlighted:YES];
}
-(void)finishHighlight:(UIButton*)a{
[a setHighlighted:NO];
}
these are the functions which I’m using in above … and
This would be super easy if both the buttons are connected to “IBOutlets”. Are they?
Like for example:
parameters a & b are ignored in this particular…