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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:12:01+00:00 2026-05-20T12:12:01+00:00

I have an app using a tab bar and, when the app loads, I

  • 0

I have an app using a tab bar and, when the app loads, I expose a login view controller to authenticate the user:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

initialScreenViewController = [[Login alloc] init];
[window addSubview:tabBarController.view];
[window addSubview:initialScreenViewController.view];
[window makeKeyAndVisible];
return YES;

When the user successfully authenticates, I hide the login view to expose the tab bar view:

[self.view removeFromSuperview];

My question is this….I have a log out button in the app. When that button is pressed, how do I essentially expose the login screen again and block the tab view?

Thank you!
Jason

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

    The same way you did the first time:

    initialScreenViewController = [[Login alloc] init];
    [window addSubview:initialScreenViewController.view];
    

    Although it might be a little more straightforward to use presentModalViewController:animated: to display it on top of the tab bar controller.

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

Sidebar

Related Questions

I have a three view tab bar app the second view of which I
I have a multiview application using a tab bar to switch views. One is
I am using a tab bar (UITabBarController) on my app and I wish to
I created a tab bar application from the template and added a navigation controller
I have an iPhone app which was built using a standard UITabBarController. This app
So I have an iPhone application running that is controlled at the highest level
I'm building an application based on the Utility template from Xcode, to which I
Here is my problem: I've read a lot about how to use a tab
What type of iPhone application file should I use? Before, I was trying to
Preface : I am new to the iPhone SDK, Obj-C, Interface Builder and Cocoa.

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.