i am having some buttons whose tags have been set from 1 to 10.Now if user clicks on the buttons, the tag value should be send in next screen/nib’s label.
-(IBAction) gotoGameScreen:(id)sender
{
[self playAudio];
UIButton *btn=(UIButton *)sender;
NSLog(@"Use Selected Level=%d",btn.tag);//here i am getting the tag value as 1.
GameScreen *gameScreen = [[GameScreen alloc] initWithNibName:@"GameScreen" bundle:nil];
[self.navigationController pushViewController:gameScreen animated:YES];
[gameScreen release];
}
any suggestion?
Thanks
use an integer in GameScreen and define property and synthesize it and pass value of present button tag to next …