Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with Storyboard Segues #49

Closed
batnom opened this issue Jun 3, 2015 · 4 comments
Closed

Trouble with Storyboard Segues #49

batnom opened this issue Jun 3, 2015 · 4 comments

Comments

@batnom
Copy link

batnom commented Jun 3, 2015

Hi there,

I have an instance of a OnboardingViewController named HomeViewController on my Storyboard and it is set to be the 'Initial View Controller', followed the example here: #31 (comment)

It's showing the Onboarding flip-book, but when I try to use a Segue after they hit the last button it chucks up the error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<HomeViewController: 0x7fc8cbdaaf70>) has no segue with identifier 'GO''

This is how the page is created:

OnboardingContentViewController *firstPage = [[OnboardingContentViewController alloc] initWithTitle:@"Welcome" body:@"This is a demo." image:[UIImage imageNamed:@"fb_big"] buttonText:@"Enable Locational Services" action:^{
            NSLog(@"yay");
            [self performSegueWithIdentifier:@"GO" sender:self];
        }];

I've played around with calling it from a __weak typeof(self) weakSelf = self;, or using self.parentViewController, and a bunch of other ways with no luck.

Is there a way to do this? I would much rather do it this way than the appDelegate way. It all seems to be working except for pushing to the next view controller.

Many thanks

@mamaral
Copy link
Owner

mamaral commented Jun 3, 2015

Have you set the segue identifier for "Go" in interface builder?

@batnom
Copy link
Author

batnom commented Jun 4, 2015

Yes its a Push segue with the identifier "GO"

@mamaral
Copy link
Owner

mamaral commented Jun 4, 2015

hmm perhaps that's the problem. I'll have to look again at the example you posted a link to, but whenever I've implemented this the transition from the onboarding to the app itself has never been a push, it's always been a direct swap of the root view controller of the app. I don't mess around with storyboards and segues often, so I don't know how much I would be able to help without maybe a sample app to run?

@mamaral
Copy link
Owner

mamaral commented Jul 31, 2015

If you could get me a sample project I could tinker with, I'll try and see what's going on. In the meantime - I'm going to close this until there's an update.

@mamaral mamaral closed this as completed Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants