我正在申请iPad。我有一个UISplitViewController
,如果我在UITableView Controller中为我的几个View Controller中的一个使用选择推送(如果我为此设置了目标DetailSplitViewController
),则应用程序崩溃。这个错误必须给出:
05/20/2014 13:59:32.439 Units [1534:60 b] *** Assertion failure in - [UIStoryboardPushSegue perform] / SourceCache/UIKit_Sim/UIKit-2935.137/UIStoryboardBuiltInSegues.m: 24
05/20/2014 13:59:32.441 Units [1534:60 b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expected a navigation controller, but got an instance of' UIViewController 'instead, while performing a split view controller push segue (identifier'') for index # 1 '
*** First throw call stack:
(
0 CoreFoundation 0x02b6c1e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x017788e5 objc_exception_throw + 44
2 CoreFoundation 0x02b6c048 +[NSException raise:format:arguments:] + 136
3 Foundation 0x0114b4de -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
4 UIKit 0x007a0ac4 -[UIStoryboardPushSegue perform] + 854
5 UIKit 0x0078ff0c -[UIStoryboardSegueTemplate _perform:] + 174
6 UIKit 0x0078ff87 -[UIStoryboardSegueTemplate perform:] + 115
7 UIKit 0x00315965 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1453
8 UIKit 0x00315b14 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 279
9 UIKit 0x0031a10e __38-[UITableView touchesEnded:withEvent:]_block_invoke + 43
10 UIKit 0x002490aa ___afterCACommitHandler_block_invoke + 15
11 UIKit 0x00249055 _applyBlockToCFArrayCopiedToStack + 403
12 UIKit 0x00248e76 _afterCACommitHandler + 532
13 CoreFoundation 0x02b3436e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
14 CoreFoundation 0x02b342bf __CFRunLoopDoObservers + 399
15 CoreFoundation 0x02b12254 __CFRunLoopRun + 1076
16 CoreFoundation 0x02b119d3 CFRunLoopRunSpecific + 467
17 CoreFoundation 0x02b117eb CFRunLoopRunInMode + 123
18 GraphicsServices 0x02dc95ee GSEventRunModal + 192
19 GraphicsServices 0x02dc942b GSEventRun + 104
20 UIKit 0x0022bf9b UIApplicationMain + 1225
21 Jednotky 0x0000dc2d main + 141
22 libdyld.dylib 0x0640e701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
答案 0 :(得分:0)
正如已经告诉你的原因
'Expected a navigation controller, but got an instance of' UIViewController 'instead'
好像你试图推动一个UIViewController,但你需要推送一个包含在 UINavigationController
中的UIViewController