我的應用程序運行在模擬器罰款...但不是真實設備....,我已經越獄的iPhone,所以我無法通過設備調試如果我使用嘗試捕捉類似這樣在實際設備上使用xcode中的try catch塊嗎?
@try
{
Statements
}
@catch (NSException *ex) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[NSString stringWithFormat:@"%@",ex]
delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
}
我的應用程序會在崩潰之前在alertview上顯示錯誤嗎?
如果不是,我怎麼能找到錯誤在哪裏?
即使他不執行協議的應用程序不會崩潰,直到他點擊該按鈕,使警報仍將顯示 – Daniel 2009-08-21 15:32:30
這是真的,只是想用提任何「陷阱」 – slf 2009-08-21 17:08:11
這個原因我的應用程序變得非常慢,它不顯示任何alertview ...我做錯了什麼? 如何顯示nsexception作爲alertview消息 – 2009-08-23 10:04:12