當我嘗試加載另一種觀點認爲,我得到這個錯誤:的Xcode 4.2錯誤
2012-02-21 20:31:38.477 App Demo[1671:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithString:]: nil argument'
我找不到哪裏是錯誤完全一樣。
任何幫助?
更新
NSString *pn1 = player1name.text;
NSString *pn2 = player2name.text;
NSString *pn3 = player3name.text;
NSString *pn4 = player4name.text;
NSString *k = kingdomLevel.text;
Kscores *kscores = [[Kscores alloc] initWithNibName:nil bundle:nil];
kscores.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:kscores animated:YES];
[[kscores player1name] setText:[NSString stringWithString:(NSString *)pn1]];
[[kscores player2name] setText:[NSString stringWithString:(NSString *)pn2]];
[[kscores player3name] setText:[NSString stringWithString:(NSString *)pn3]];
[[kscores player4name] setText:[NSString stringWithString:(NSString *)pn4]];
[[kscores king] setText:[NSString stringWithString:(NSString *)k]];
斷點停在這個代碼
[[kscores player1name] setText:[NSString stringWithString:(NSString *)pn1]];
在左下角點擊加號按鈕並選擇「添加例外斷點......」 – Costique 2012-02-21 17:38:01
添加一個異常斷點,斷點啓用和後期的代碼行的例外是被拋出。說明添加斷點的位置:http://stackoverflow.com/a/7736927/639668 – edc1591 2012-02-21 17:38:03