I have this weird problem, for some reason my segue is not working correctly.
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.
Screenshot
Things to note:
I have checked the spelling of the segue.
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.
The segue is coming from the ViewController, not the View.
Any help with this is greatly appreciated.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With