Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9152383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:01:44+00:00 2026-06-17T12:01:44+00:00

I am running on iOS 6.0 storyboard enabled I have a NavController linked to

  • 0

I am running on iOS 6.0 storyboard enabled

I have a NavController linked to a TableViewController.
This TableView can segue to AViewController or BViewController.

When I am in A, I want to pop back to the root and perform segue to B with this line :

UINavigationController *nav = self.navigationController;
[nav popToRootViewControllerAnimated:YES];
[nav performSegueWithIdentifier:@"GoToB" sender:self];

I checked the storyboard, GoToB do exist and is linked from the TableViewController to BViewController

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<NavMainViewController: 0xb921fa0>) has no segue with identifier 'GoToB''

What am I missing ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:01:45+00:00Added an answer on June 17, 2026 at 12:01 pm

    The segue will be attached to the view controller you pop to, not nav which is the container view controller that contains it. So this would be closer:

    UINavigationController *nav = self.navigationController;
    [nav popToRootViewControllerAnimated:YES];
    
    UIViewController *rootVC = [nav.viewControllers objectAtIndex:0];
    [rootVC performSegueWithIdentifier:@"GoToB" sender:self];
    

    But, I think the problem here will be that the pop animation will conflict with the segue. Doing the pop with …Animated:NO might fix it, but I think it would be more correct (and more robust for animations) to perform the segue from the rootVC.

    rootVC would implement viewDidAppear as follows:

    - (void)viewDidAppear:(BOOL)animated {
    
        [super viewDidAppear:animated];
        if (!self.isBeingPresented && /* any other condition that makes you want this */) {
            [self performSegueWithIdentifier:@"GoToB" sender:self];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jailbroken iPhone 4 running iOS 4.3.3 upon which I want to
This works on the iPhone BTW (Both running iOS 5.1) My app freezes when
I can detect that app is running under iOS Simulator (using sysctlbyname(hw.machine) ), but
I have an app that runs on iPad and iPhone running iOS 3.2, but
I've got a strange crash on a customers iPhone (running iOS 5.1), I have
I have an iPod touch running iOS 4.2.1, and a simulator running iOS 4.2.
I have a jailbroken Iphone 4 running iOS 5.0.1 and I'm trying to send
I have the following code which will allowed a user running iOS to move
I need to clarify one thing. I have a jailbroken iPhone running iOS 4.0,
I have a jailbroken iPhone running iOS 5.1.1. I am using Xcode 4.3.2, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.