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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:54:51+00:00 2026-05-11T16:54:51+00:00

I am breaking the normal paradigm of a UINavigationController, or at least I’m trying

  • 0

I am breaking the normal paradigm of a UINavigationController, or at least I’m trying to.

We know that the Navigation Controller manages navigation via a stack. If I initialize with root controller A, navigate to B, and then Navigate to C, the Stack will look like – C/B/A.

What I want to do though, is have a button on view C that will show another view, say X, but still keep the Navigation Controller’s nav bar in place. Essentially, switch “C” and “X” on the stack. I tried to accomplish that by popping C off and immediately pushing X as shown below, but it didn’t work. Am I going down the wrong path here?

-(IBAction)showViewX:(id)sender {
[[self.parentViewController navigationController] popViewControllerAnimated:NO];

XViewController *xViewController = [[XViewController alloc]
        initWithNibName:@"X" 
        bundle:[NSBundle mainBundle]];
[[self.parentViewController navigationController] pushViewController: xViewController animated:YES];
[xViewController 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-11T16:54:51+00:00Added an answer on May 11, 2026 at 4:54 pm

    What you call “view C” is actually “view controller C”. Since it is a view controller, you can easily set it up to switch between, say, two views, X and Y. So you just leave C on the stack, don’t pop it, and switch between views in C itself. For example, you can set up C to use a toolbar to switch between views.

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

Sidebar

Related Questions

I'm breaking my head trying to call a js function from a button element
I've been breaking my head for the past two days searching and trying some
I have a lot of existing code that just uses the normal dateTime class
I am trying to find a better way to integrate IRB with my normal
So I have a nasty stack overflow I have been trying to track down
Possible Duplicate: url encoded forward slashes breaking my codeigniter app This is my controller:
Breaking down the MS RBTree (an internal .Net abstract class), I have discovered that
I'm currently breaking my head on a 1452 error (using Symfony2 with doctrine). Here
I'm breaking my head over this code: <html> <head> <title>Westpop</title> <link rel=stylesheet href=opmaak.css> </head>
I was wondering whether breaking up a word with a span tag to change

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.