我有一個棘手的問題(對我來說很難,因爲我是一個新手)。我有一個桌面視圖應用程序,我正在努力。它從一個表開始,然後導航到一個視圖控制器。在這個視圖控制器中,我使用了一些示例代碼,這些代碼被添加到一個按鈕中,該按鈕將添加一個聯繫人到iPhone地址簿。iPhone應用程序在導航過程中崩潰
我的問題是,當用戶導航回到數據表,應用程序崩潰。有沒有人可以提供的建議?或者,也許有人可以向我發送代碼進行審查?
更新*
這是來自控制檯的信息。
[Session started at 2010-07-20 22:51:46 -0500.]
2010-07-20 22:51:49.621 Infinite Possibilities[5882:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithString:]: nil argument'
*** Call stack at first throw:
(
0 CoreFoundation 0x025ff919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0274d5de objc_exception_throw + 47
2 CoreFoundation 0x025b8078 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x025b7fea +[NSException raise:format:] + 58
4 Foundation 0x0006869c -[NSPlaceholderString initWithString:] + 105
5 Infinite Possibilities 0x00003b90 -[RootViewController tableView:didSelectRowAtIndexPath:] + 3405
6 UIKit 0x0034c718 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
7 UIKit 0x00342ffe -[UITableView _userSelectRowAtIndexPath:] + 219
8 Foundation 0x00059cea __NSFireDelayedPerform + 441
9 CoreFoundation 0x025e0d43 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
10 CoreFoundation 0x025e2384 __CFRunLoopDoTimer + 1364
11 CoreFoundation 0x0253ed09 __CFRunLoopRun + 1817
12 CoreFoundation 0x0253e280 CFRunLoopRunSpecific + 208
13 CoreFoundation 0x0253e1a1 CFRunLoopRunInMode + 97
14 GraphicsServices 0x02e642c8 GSEventRunModal + 217
15 GraphicsServices 0x02e6438d GSEventRun + 115
16 UIKit 0x002e8b58 UIApplicationMain + 1160
17 Infinite Possibilities 0x00002834 main + 102
18 Infinite Possibilities 0x000027c5 start + 53
)
terminate called after throwing an instance of 'NSException'
它是什麼樣的崩潰?應該說在控制檯。 – AtomRiot 2010-07-21 03:28:00
調試應用程序並提供崩潰日誌,以便我們可以看到導致崩潰的原因。而且,提供有問題的代碼會很有用。 – raidfive 2010-07-21 03:28:36
我猜想有些對象在它使用之前就被釋放了,可能檢查你的視圖控制器,你可能已經釋放了兩次對象。 – Splendid 2012-03-07 17:52:29