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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:43:48+00:00 2026-05-28T20:43:48+00:00

I have a view controller which contains a table view, and which is wrapped

  • 0

I have a view controller which contains a table view, and which is wrapped within a navigation controller, i.e. in the app delegate these two are created and set as:

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.myViewController];
self.window.rootViewController = navController;

If the user clicks on a row within a table then another view controller is created and pushed to the navigation controller’s stack:

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

The webPageController loads and reads local files. If a file is missing I want to abort the loading of the webPageController and the displaying of its view and have the table view displayed.
How should I achieve this?

If the webPageController detects a problem I’ve tried experimenting with it calling various things such as:

[self.navigationController popViewControllerAnimated:YES];

or

 [self.navigationController.navigationBar popNavigationItemAnimated:YES];

To pop itself off the navigation stack, however these aren’t working, is it wrong for a navigation controller to attempt to pop itself like this? What is the canonical way of implementing this?

Thanks

  • 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-28T20:43:49+00:00Added an answer on May 28, 2026 at 8:43 pm

    That should be fine. Where are you calling popViewControllerAnimated:? If you’re calling before viewDidAppear, you’ll likely run into problems. ViewControllers need to finish the appearing and disappearing before they can make any kind of pop or push to their stack. If you do it before, you get really weird results. The most common symptom of this is it doesn’t work. Often buttons inside it will get messed up as well.

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

Sidebar

Related Questions

I have a navigation controller which also has a table view. I want to
I have one view controller which contains two views (redView, blueView). The views are
I have a view controller with table view that contains 8 cells(sections).I have created
I have a table view controller which doesn't let me manually scroll to the
In my IB I have a navigation controller which has in it a view
I have two view controller classes in my application delegate. I can change from
I have a form(table view) which contains textfields and textview as subviews,I need to
I have a view controller MainVC which contains a view where I want to
I have 2 view controller pages.Add Reminder page which contains save button as right
I have an app with a table view at the root in a navigation

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.