私の質問がばかげているように聞こえるかもしれませんが、すみません。私は iOS 開発に比較的慣れていませんが、iOS6 用にアプリを移植する必要があります。このアプリは iOS 5 と XCode 4.3.2 で完全に動作しますが、iPhone 6.0 シミュレーターの Xcode 4.5 に奇妙なバグがあります。初期画面が読み込まれた後、任意のボタンを押すことができますが、次のエラーが表示されます。
`Terminating app due to uncaught exception 'NSGenericException', reason: 'Could not find a navigation controller for segue 'register'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.`
StartScreenViewController の prepareForSegue メソッドは次のようになります。
if ([[segue identifier] isEqualToString:@"register"] || [[segue identifier] isEqualToString:@"forgotPassword"]) {
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:[segue destinationViewController]];
appDelegate.window.rootViewController = navController;
}
ブレークポイントを設定すると、メソッドがまだ正しく呼び出されていることがわかりますが、prepareForSegue が終了した後、前述のエラーでアプリがクラッシュします。誰かが私を正しい方向に向けることができますか?
マーティン、どうもありがとう