Receiver没有带标识符execption的segue [英] Receiver has no segue with identifier execption

查看:142
本文介绍了Receiver没有带标识符execption的segue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个奇怪的问题,由于某些原因我的segue无法正常工作。

I have this weird problem, for some reason my segue is not working correctly.

我有两个segue设置,具体取决于一个设置的状态确定segue它选择了。其中一个像魅力一样,而另一个像接收者没有带标识符的信号

I have two segues setup, depending on the status of one setting determine the segue it choses. One of them works like a charm while the other gets "Receiver has no segue with identifier"

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.

// check if registered already
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"registered"] == YES) {
    // Registered

    // Give the logo some time to show before moving on
    [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(splashLoadedRegistered:) userInfo:nil repeats:NO];
} else {
    // Register

    // Give the logo some time to show before moving on
    [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(splashLoaded:) userInfo:nil repeats:NO];
}
}



-(void)splashLoaded:(id)sender
{
//This one works
[self performSegueWithIdentifier:@"registerSegue" sender:self];
}

-(void)splashLoadedRegistered:(id)sender
{
//This one does not work
[self performSegueWithIdentifier:@"registeredSegue" sender:self];
}

这是我的故事板的屏幕截图。

Here is a screen shot of my storyboard.

截图

注意事项:


  1. 我检查了segue的拼写。

  1. I have checked the spelling of the segue.

这是应用程序中唯一的故事板,我已经检查过以确保这是info.plist中的一个设置,并且在摘要中项目。

This is the only storyboard in the app, and I have checked to make sure this was the one setup in the info.plist, and in the summary of the project.

我重置了模拟器,并清理了项目。

I have reset the simulator, and cleaned the project.

segue来自ViewController,而不是View。

The segue is coming from the ViewController, not the View.

非常感谢任何帮助。

推荐答案

我的问题没有答案。问题似乎是xcode中的一个简单错误。在模拟器中更换设备后,segue工作正常。它甚至在将其更改回有问题的设备类型后工作。

There was no Answer to my question. The problem seems to be a simple bug in xcode. After changing the device in the simulator the segue work fine. It even worked after changing it back to the device type that had the problem.

这篇关于Receiver没有带标识符execption的segue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆