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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:33:30+00:00 2026-05-31T12:33:30+00:00

In building my application which is a tab based application, from the first tab,

  • 0

In building my application which is a tab based application, from the first tab, the user has the option to view their profile information (which is specific to the app). SO have set up UINavigationController with following view controllers:

1 - Edit profile
0 - View profile (also the root view controller for the `UINavigationController`).

The flow I would like to achieve is if a profile has not been set up (i.e. the first time the application is run), I would like to go directly the Edit Profile View, which right now is the default behaviour since that view is at the top of the stack.

The problem I have run into is, if the profile has been set up, how would I go directly to View Profile. I have looked at the documentation for the UINavgationController, and it unclear about popping a view controller off the stack. The method popToViewController:animated return an NSArray of items popped from the stack. Does that mean those view controllers are no longer available, and/or is there a better method to go directly to the view controller that I want?

  • 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-31T12:33:32+00:00Added an answer on May 31, 2026 at 12:33 pm

    If you only have two views in the navigation controller, and View is the root view controller, you can make sure that View is the one that is shown by running popToRootViewControllerAnimated: immediately before or after that tab has been selected on the tab bar controller.

    If you are in a case where you want Edit to show, run popToRootViewControllerAnimated: followed by pushViewController:animated: with the Edit view controller.

    When you want to pop, you can use popViewControllerAnimated: rather than popToViewController:animated. (You only have two view controllers in this nav controller, so ther is only one that will ever be popped.)

    This seems pretty simple, unless I have misunderstood your question.

    The array of view controllers that are returned from the popToViewController:animated aren’t needed by most programs. I haven’t really found a need to use this method myself, and, as I said, it doesn’t look like you need it here.

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

Sidebar

Related Questions

I'm building an application based on the Utility template from Xcode, to which I
I am building an application which has multiple user entry screens. I would like
I am building an android application which has a listview and when the user
I'm building an application which basically has a lot of user input, text boxes,
I'm looking for some opinions here, I'm building a web application which has the
I am building an application which has GtkMenu widget. I am using Glade RAD
I am building an application which needs to call a certain API at specific
I am building an application which has requirements stating that all browser features must
I am building an application which uses Flashdata to display messages to the user
I'm building an application which is Client (C#) & Server (PHP) based application. 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.