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 7176589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:32:27+00:00 2026-05-28T16:32:27+00:00

I am presenting a navigation controller with a view controller initialized as its root

  • 0

I am presenting a navigation controller with a view controller initialized as its root using presentModalViewController. However, when I push another view controller onto this new navigation stack, the back button needs to be pushed twice to return to the original view presented modally. Any idea why this would occur? Is it possible that the new view controller is being pushed onto the original navigation controller and then the navigation controller in the modal view controller as well?

My code in the original navigation controller:

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:addViewController];  
[self.navigationController presentModalViewController:navController animated:YES];
[addViewController release];
[navController release];

And then my code inside the modal view:

PriorityViewController *priorityView = [[PriorityViewController alloc] initWithNibName:@"PriorityView" bundle:nil];
priorityView.taskInfo = self.taskInfo;
priorityView.isAdding = YES;
[self.navigationController pushViewController:priorityView animated:YES];
[priorityView release];
  • 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-05-28T16:32:29+00:00Added an answer on May 28, 2026 at 4:32 pm

    I figured out my issue. I was handling the view controllers, and the navigation controller just fine. But was using a table view to push the new controllers onto the navigation controller stack. And the switch statement handling the row selection in my table view was missing a break statement, so two cases were being called instead of just one meant for that row, if that makes any sense.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am presenting a modal navigation bar controller initialized with a root controller (which
I am trying to push in a new view controller with the code: [self.navigationController
I'm writing an iPhone app. Starting from a view controller in a navigation stack
When presenting a navigation controller modally, it is often simpler to create and configure
I am presenting a modal view controller as a form sheet and dismissing it
I can't seem to push a UITableViewController onto a UIViewController using the following code:
I'm using a pretty standard recipe for presenting ModalViewControllers in my iPhone apps, but
This is related to preventing webform resubmission , however this time the context is
I have a tab bar application that contains navigation views in 2 of its
I have standard view controller acting as the delegate for a modal view controller

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.