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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:19:00+00:00 2026-05-20T02:19:00+00:00

I have a tabbar controller app with two tabs. One of my tabs uses

  • 0

I have a tabbar controller app with two tabs. One of my tabs uses a navigation controller.
The navigation controller that I made for this resides in View A. View A acts solely as a controller and automatically pushes View B which in turn pushes view C which pushes View D.

I want the next view to be View B, so I used

NSArray *viewControllers = [[self navigationController] viewControllers];
int i=0;
while (! [[[viewControllers objectAtIndex:i] nibName] 
        isEqualToString:@"ViewBController"]
        && i < [viewControllers count]) 
             i++;

to get the view I want (in some cases the order of the views may change so I don’t want to hardcode it)
and then

self.navigationController popToViewController:[viewControllers objectAtIndex:i] animated:NO];

to get back to view B

My issue is that the app crashes at this point. Well technically it crashes after it deallocs View C (I put nslogs there to figure that out).

I have no idea what my issue can be? Can anyone provide insight?

EDIT: I also tried making a new view controller, View E, and pushing that and it still crashes

  • 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-20T02:19:01+00:00Added an answer on May 20, 2026 at 2:19 am

    I finally figured out my problem, it turned out not to be a navigation issue.

    Before switching views I had an alert that I set to autorelease, and then I also released it.
    I figured this out by using NSZombie, which is awesome.

    For anyone who needs the reference check this out:
    http://cocoadev.com/index.pl?NSZombieEnabled

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

Sidebar

Related Questions

I have a tabbar Controller . which have 5 Tabs in that one is
So I have two view controller that I load on the app delegate when
Have created a small two tab app, then subclassed another view controller to create
I have an app consisting of a TabBar with a few TabBarControllers. One Controller
I have an app that has a tabBar Controller and a navBar Controller. It
In my iphone app, i have a navigation Controller and a tabBar Controller. The
I have a tabbar-based app with three tabs, one of them is a running
I have a tab-bar and navigation controller application (like Youtube app or Contacts app).
Here is the thing. I currently have a tabBar controller, with several navigation controllers
I have two view controllers in a tabbar which can both edit data. Therefore,

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.