xin lỗi nếu câu hỏi của tôi nghe có vẻ ngu ngốc đối với một số bạn. Tôi tương đối mới với iOS Development nhưng tôi phải chuyển một ứng dụng cho iOS6. Ứng dụng hoạt động hoàn hảo trên iOS 5 và XCode 4.3.2 nhưng tôi gặp phải một lỗi lạ với Xcode 4.5 trên trình giả lập iPhone 6.0. Sau khi màn hình ban đầu được nạp tôi có thể nhấn bất kỳ nút nào tôi muốn, và tôi nhận được lỗi:Segue không hoạt động với iOS6
`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.`
Phương pháp prepareForSegue của StartScreenViewController trông như thế này
if ([[segue identifier] isEqualToString:@"register"] || [[segue identifier] isEqualToString:@"forgotPassword"]) {
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:[segue destinationViewController]];
appDelegate.window.rootViewController = navController;
}
Thiết lập một breakpoint cho tôi thấy rằng phương pháp vẫn được gọi là corectly, nhưng sau khi PrepareForSegue kết thúc, ứng dụng bị lỗi với lỗi đã đề cập ở trên. Ai có thể chỉ cho tôi đi đúng hướng không?
Thank you very much Martin