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

  • Home
  • SEARCH
  • 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 4623422
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:59:06+00:00 2026-05-22T02:59:06+00:00

I didn’t plan ahead properly for view navigation in my app, so it’s possible

  • 0

I didn’t plan ahead properly for view navigation in my app, so it’s possible for the user to go through a loop that just stacks modal views on top of each other, and from there the root view controller is only accessible through the time-consuming process of manually dismissing each and every repeated view.

I can’t just go ahead and use popToRootViewControllerAnimated: without a navigation controller on top of it all (calling presetModalViewController:animated: repeatedly seemed like a good idea at the time), so unless there’s something Google is hiding from me, I’m completely lost.

Rewriting half the navigation code is not ideal, but if that really is the only option, I’ll give it a shot.
Avoiding that would certainly be preferable.

No idea what code would be helpful, if any. It’s just presenting/dismissing modal view controllers with a few subclasses of UIViewController

  • 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-22T02:59:07+00:00Added an answer on May 22, 2026 at 2:59 am

    Okay, now I got it. Below the line is what I should never have done. Rather than trying to contain a loop-grown stack, I should have just blocked it to begin with.

    That is, the “Load” button no longer spawns another view. Instead, it dismisses the current view, which can only ever be a child of the Load view, giving the illusion of a new view and completely removing the problem of an uncontrollably growing stack.


    Again, this is the wrong option:

    A global, a few #define‘d strings, and some if/else stacks, and the lack of a navigation controller is not a problem.

    If anyone is interested in what I’ve done to achieve this (and/or how much fun it’ll be to modify later), I’ll drop some of the it into this answer. It’s not pretty and it was a pain to write (mostly because the new code spans four files and breaks quietly), but it does exactly what I want.

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

Sidebar

Related Questions

Didn't find any from their website. I mostly just trying to see which one
I didn't attend PDC 2008, but I heard some news that C# 4.0 is
I didn't find this in the documentation . Should I just make the close
I didn't want to go through all the event unsubscription memory leak posts to
I didn’t found short form for this question as subject… Is it possible to
I didn't find anywhere whether is possible to query from Db4o all objects implementing
I didn't think it was possible for client side applications to access the harddrive?
(Didn't mean to create a new question, but revised the old one enough that
I didn't imagine that I would encounter radically new syntax in Java anymore at
I didn't see any questions that asked this previously so here goes: Once you

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.