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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:34:23+00:00 2026-05-13T11:34:23+00:00

i have a 3 tabbar in my app. in my Appdelegate i have a

  • 0

i have a 3 tabbar in my app. in my Appdelegate i have a reference to loginview where i am popingup loginview if user is not logged in.here is method.

 - (void)LoginView
{
loginView = [[[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil] autorelease]; 
UINavigationController* nav = (UINavigationController*)[tabBarController.viewControllers objectAtIndex:0]; 
loginView.navC = nav; [nav presentModalViewController:loginView animated:YES];
}

3rd tabbar is a settings view and i have a signout button there.
at first time i can see correct user name,but as soon as i click sign out i am calling same method shown above using app delegate. logview gets popedup correctly and if i signin as different user it still show previous user name (because 3rd tabbar view is already loaded)
so my question is
1)which is the best place to put loginview
2)how do i reset the app w/o restarting it after signout
i hope my question is clear. or i am willing to give more details.
thanks.
Update:
basically i want to unload all view on signout and start from the beginning.

  • 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-13T11:34:23+00:00Added an answer on May 13, 2026 at 11:34 am

    something which worked for me, and i hope this is proper way to doing.here is what i did.

    NSArray *vc= tabBarController.viewControllers;
    for (int i = 0; i < [vc count]; i++) {
        UINavigationController *nc = [vc objectAtIndex:i];
        if (nc == tabBarController.selectedViewController) {
            continue;
        }
        [nc popToRootViewControllerAnimated:NO];
    }
    

    i hope this unloads all the view from memory and force them to load again when tabbar is getting switched.let me know if this is not good way.

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

Sidebar

Related Questions

I have a tabbar based app. In the app delegate, I've implemented: - (void)tabBarController:(UITabBarController
I have a tabbar based app and would like to reference one of three
i have this at my appdelegate: for 1st app: - (void)applicationDidFinishLaunching:(UIApplication *)application { [window
I am making a tab bar application. In AppDelegate in method -(void)applicationDidBecomeActive I have
I have a TabBar app with one of its tabs embedded in a NavigationController.
I have a tabBar App, with 5 tabs. The application was built in previous
I have a TabBar app (no Storyboards) with a UIView in the first window
I have an TabBar app that I would like to be in landscape and
I have an app with tabbar and webview. I'm trying to make the app
I am doing an app based on tabbarController. I have a 3 tabbar items.

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.