ios应用程序在语言更改后崩溃

ios应用程序在语言更改后崩溃,ios,uiviewcontroller,localization,crash,uistoryboard,Ios,Uiviewcontroller,Localization,Crash,Uistoryboard,我有一个故事板,其中包含一个名为“PendingToursVC”的ViewController。在我的代码中,我执行以下操作: @try { self.pendingToursVC = [storyboard instantiateViewControllerWithIdentifier:@"PendingToursVC"]; <-- app crashes on this line } @catch (NSException *exception) {

我有一个故事板,其中包含一个名为“PendingToursVC”的ViewController。在我的代码中,我执行以下操作:

@try {
        self.pendingToursVC = [storyboard instantiateViewControllerWithIdentifier:@"PendingToursVC"]; <-- app crashes on this line
    }
    @catch (NSException *exception) {
        NSLog(@"exception:\n%@", [exception description]);
    }
@试试看{

self.pendingToursVC=[storyboard InstanceEviewController WithiIdentifier:@“pendingToursVC”];感谢阅读。解决方案是,我有两个故事板(德语和英语)。在英文故事板中有viewcontroller。但我昨天将iphone从西班牙语转为德语。因此,该应用程序尝试从德语故事板中检索viewcontroller。因此它不存在并崩溃。这是一个可怕的错误。

我能想到的一件事是,日志已缓冲,尚未刷新。尽管可能性不大,但至少是原因之一。我建议将日志放在命令之前,命令之后,而不是只打印一次异常,复制并粘贴该日志行100次,然后看看是否(以某种方式)使情况有所不同您需要继续通过异常将其记录到控制台。我猜nib不存在,或者被命名为其他名称。感谢你们的帮助。我发现并更新了我的问题。@toom:请记住,您可以发布您自己问题的答案,以便将来的读者可以快速告诉您需要什么d来诊断和解决您的问题。