我有一個storyboard
。射擊賽段失敗
在此storyboard
中有一個UITableViewController
,它使用自定義類comMasterViewController。
使用storyboard
,我只需控制從UITableViewController
拖動到另一個場景。
創建一個模態segue
。我將其標識符更改爲「loadingDataSegue」。
在我UITableViewController
代碼,我火了這條線:
[self performSegueWithIdentifier:@"loadingDataSegue" sender:nil];
我收到:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: 'Receiver (<comMasterViewController: 0x1b6290>) has no segue with
identifier 'loadingDataSegue''
什麼沒有被迷上了正確?
感謝您的幫助
編輯: 我敢肯定,我鏈接TVC,並沒有任何的子視圖。縱觀故事板代碼,我看到以下內容:
<tableViewController storyboardIdentifier="comMasterViewController"
title="comMasterViewController" clearsSelectionOnViewWillAppear="NO" id="19"
userLabel="comMasterViewController" customClass="comMasterViewController"
sceneMemberID="viewController">
,並在底部,爲子標籤,以<tableViewController>
而不是任何其子視圖:
<connections>
<segue destination="UCh-sM-lba" kind="modal" identifier="loadingDataSegue"
id="epP-jH-GLZ"/>
</connections>
這裏是堆棧跟蹤:
0 CoreFoundation
0x363388a7 __exceptionPreprocess + 186
1 libobjc.A.dylib
0x3758d259 objc_exception_throw + 32
2 UIKit
0x31193a3f -[UIViewController performSegueWithIdentifier:sender:] + 154
3 EZSystem
0x000bdfe7 -[comMasterViewController insertNewObject:] + 58
4 CoreFoundation
0x362923fd -[NSObject performSelector:withObject:withObject:] + 52
5 UIKit
0x30fc8faf -[UIApplication sendAction:to:from:forEvent:] + 62
6 UIKit
0x3108e76b -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 118
7 CoreFoundation
0x362923fd -[NSObject performSelector:withObject:withObject:] + 52
8 UIKit
0x30fc8faf -[UIApplication sendAction:to:from:forEvent:] + 62
9 UIKit
0x30fc8f6b -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
10 UIKit
0x30fc8f49 -[UIControl sendAction:to:forEvent:] + 44
11 UIKit
0x30fc8cb9 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
12 UIKit
0x30fc95f1 -[UIControl touchesEnded:withEvent:] + 476
13 UIKit
0x30fc7ad3 -[UIWindow _sendTouchesForEvent:] + 318
14 UIKit
0x30fc74c1 -[UIWindow sendEvent:] + 380
15 UIKit
0x30fad83d -[UIApplication sendEvent:] + 356
16 UIKit
0x30fad0e3 _UIApplicationHandleEvent + 5826
17 GraphicsServices
0x3264f22b PurpleEventCallback + 882
18 CoreFoundation
0x3630c523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
19 CoreFoundation
0x3630c4c5 __CFRunLoopDoSource1 + 140
20 CoreFoundation
0x3630b313 __CFRunLoopRun + 1370
21 CoreFoundation
0x3628e4a5 CFRunLoopRunSpecific + 300
22 CoreFoundation
0x3628e36d CFRunLoopRunInMode + 104
23 GraphicsServices
0x3264e439 GSEventRunModal + 136
24 UIKit
0x30fdbe7d UIApplicationMain + 1080
25 EZSystem
0x0009f963 main + 86
26 EZSystem
0x0009f908 start + 40
這裏是一個圖像:
是否有可能使用'alloc/initWithStyle'創建表視圖控制器的實例,而不是從故事板中獲取它?如果是這種情況,我不認爲這種情況會存在。看着你的故事板,它看起來並不那樣,但我看不到任何其他錯誤...... – jrturton 2012-04-03 16:21:23