0
我有一些按鈕的標籤已經設置爲1到10.現在如果用戶點擊按鈕,標籤值應該在下一個屏幕上發送/ nib的標籤。在按鈕上使用標籤並在下一個視圖中傳遞標籤值label-iphone
-(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];
}
有什麼建議嗎? 感謝