2013年1月11日金曜日

[iOS]エラー:Push segues can only be used when the source controller is managed by an instance of UINavigationController

tableViewControllerをつないだときに、その前にNavigationControllerを通す。

そのときに出たエラーがこれ


'NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController.'

でなにかというと、ボタンを押した時に、modal型やpush型などがあり、
その中で、push型を選んだページ遷移にした場合に起こる

対処法

図のようにNavigationControllerに受け渡すセグエで
Style:Pushを ModalかCustomに変更すれば問題ない。