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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:30:00+00:00 2026-05-27T00:30:00+00:00

My problem: My app requires a user to be logged in, so the first

  • 0

My problem:

My app requires a user to be logged in, so the first view I show is a login view. If we are logged in, then we show the app view, which is a tab bar controller. One of these tabs is account info + logging out. On logging out, I want to go back to the the login screen.

My solution:

The root view is a navigation controller, which holds the main view. The main view is transparent, just says are you not logged in? Push the account screen onto the stack. If logged in, push the tab controller view onto the stack. Each tab in the tab controller is a navigation controller. Clicking on the account tab pushes the account view on the account view onto the stack. The account view has a logout button, which pops up 2 views (and doesn’t work):

 // Go to main view (2 views up) to show default login screen (as we won't be logged in anymore)
    UINavigationController *navController = self.navigationController;
    [navController popViewControllerAnimated:NO];
    [navController popViewControllerAnimated:YES];

What I think is the problem:

The navigation controller that I have on the top level is not the same as the lower level navigation controllers in the tab controller.

My problem seems fairly typical, but my solution seems really clunky. This can’t be the best way to do it! Any advice?

  • 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-27T00:30:01+00:00Added an answer on May 27, 2026 at 12:30 am

    Try something like this? It seems convoluted but let’s try it.

    [self.navigationController popViewControllerAnimated: NO];
    [self.tabBarController.navigationController popViewControllerAnimated: YES];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app has a login screen before a user goes into the main view.
I'm writing an Android application which requires the user to login. I have a
I have a problem. Part of my app requires text to be shown in
here is the problem : there is classic asp app which is calling lame.exe
I have a page which displays a form that a logged-in user can use
My app requires the user to go through multiple pages of input (signing up
I am creating an app that requires the user to type into an EditText.
I have a Winforms app which runs under a standard user account (i.e. user
I have an app that requires push notifications sent to user when a post
I have no problem sending emails from within my app. Right now it requires:

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.