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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:54:38+00:00 2026-05-25T20:54:38+00:00

I am having some problems with popping items from the navigation stack and no

  • 0

I am having some problems with popping items from the navigation stack and no idea why its behaving like it is.

Stack
A classA
B classB
C classC
D classD

At stack D I create another classD and add it to the stack.

Stack
A classA
B classB
C classC
D classD
E classD

Before I create E and push it on to the stack, I do a pop to get rid of D so that the stack becomes

Stack
A classA
B classB
C classC
E classD

However when I pop, the self.navigationController.viewcontrollers becomes 0 and im stuck on C with E not becoming visible. Why does the pop just remove everything and go to C?

At C in didSelectRowAtIndexPath I create a ClassD and do:

[self.navigationController pushViewController:ClassD animated:YES];

At D in didSelectRowAtIndexPath I create another ClassD and do:

[self.navigationController popViewControllerAnimated:NO]; //remove current and replace with new
[self.navigationController pushViewController:ClassD animated:YES];

But it doesn’t seem to do what as expected. I sense the transition from pop to push seems to be too fast nothing is appearing? Any ideas?

  • 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-25T20:54:39+00:00Added an answer on May 25, 2026 at 8:54 pm

    it sounds like the popViewController is also setting the self.navigationController to nil. if self.navigationController is nil then [self.navigationController anyMethod] does nothing.

    try this (not tested):

    UINavigationController *nav = self.navigationController;
    
    [nav popViewControllerAnimated:NO]; //this pops myself
    [nav pushViewController:anotherInstanceOfClassD animated:YES];
    

    if this causes the problem that self is beeing destroyed then just add the following line before pop:

    [[self retain] autorelease]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im having some problems trying to read a SQlite data base from flash using
Ive been having some problems with understanding the MySql reader from MySql.Data.MySqlClient This is
Having some problems with syntax here. Trying to get like counts on any page
Having some problems while trying to optimize my SQL. I got 2 tables like
I am having some problems with the code from boost graph library Dijkstra example
I'm having some problems removing clients from a channellist. This is the code i
Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
Im having some problems getting the Sticky Footer to work on my site. If
I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application
I have been having some problems trying to get my PHP running. When I

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.