2012-04-03 6 views
0

私にはstoryboardがあります。ファイアリングセグが失敗する

このstoryboardには、カスタムクラスcomMasterViewControllerを使用するUITableViewControllerがあります。

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'' 

適切にフックアップされていませんか?ヘルプ

EDITため

ありがとう: 私はサブビューのいずれかの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 

ここではイメージです。 enter image description here

+0

ストーリーボードから取得するのではなく、 'alloc/initWithStyle'を使用してテーブルビューコントローラのインスタンスを作成している可能性はありますか?もしそうなら、私はセグが存在するとは思わない。あなたのストーリーボードを見ると、それはそのようには見えませんが、私は何か間違ったことを見ることはできません... – jrturton

答えて

1

SegueをTableView RowまたはUIButtonからドラッグせず、代わりにVC自体からドラッグするようにしてください。疑問がある場合は、セグを削除してもう一度接続してください。それでも問題が解決しない場合は、タイプミス(ケースを含む)もチェックしてください。

0

私はこの正確な問題(とにかく症状)があり、ElJayが私に必要なヒントをくれました。私の問題は、NavigationController内にあるTableViewControllerによって引き起こされ、NavigationControllerを使用してalloc initおよびpushによって開かれました。これが[self performSegueWithIdentifier]が機能しなかった理由です。さらに、これは私がセルから作ったセグーがうまくいかなかった理由でもありました。今では、私は[セルフ・パフォーミング]パートは必要ありません。ただPrepForSegueを準備するだけで、すべてが魅力的です。
私はこれをElJayに返信しましたが、何らかの理由で私はできません。私ができることは彼に投票を与えることだけでした。

関連する問題