撞毀我嘗試的NSTimer後,打開連接新的畫面,我用:應用與NSInvalidArgumentException
MultiplayerController* controller = [[MultiplayerController alloc] initWithNibName:@"MultiplayerController" bundle:nil];
[[self navigationController] pushViewController:controller animated:YES];
[controller.playeronecount setText:playeronecount.text];
,但應用程序是給我一個SIGABRT。
在.h文件中;
IBOutlet UILabel *playeronecount;
@property (nonatomic, retain) UILabel *playeronecount;
2012-01-12 21:56:16.016 [9621:707] - [MultiplayerController playeronecount]:無法識別的選擇發送到實例0x39824a0 2012-01-12 21:56:16.020 [9621 :707] *終止應用程序由於未捕獲 異常 'NSInvalidArgumentException',原因: ' - [MultiplayerController playeronecount]:無法識別的選擇發送 到實例0x39824a0' *第一擲調用堆棧:(0x33ff48bf 0x357101e5 0x33ff7acb 0x33ff6945 0x33f51680 0x5f85 0x31ac361d 0x33fc8a63 0x33fc86c9 0x33fc729f 0x33f4a4dd 0x33f4a3a5 0x35b8afcd 0x3508f743 0x275f 0x2704) 終止叫做拋出異常(GDB)
您尚未提供足夠的上下文來調試此問題。請張貼包括定時器在內的周邊代碼。同時發佈任何正在拋出的錯誤或異常。 – 2012-01-12 20:57:18
您是否記得在MultiplayerController.m中使用@synthesize'playeronecount'? – 2012-01-12 21:01:05
我編輯了這篇文章。當我把最後一行寫入命令時,它不是計時器。 - > [controller.playeronecount setText:playeronecount.text]; – Blazer 2012-01-12 21:01:31