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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:44:04+00:00 2026-06-04T14:44:04+00:00

I am developing an application where i need to show a list as a

  • 0

I am developing an application where i need to show a list as a menu(Courses,lessons,grade,logout) to the user. so even before this i need to show a login screen. Only upon successful and valid login i need to re-direct the user to the menu. So i have planned to develop a tabBar based application with 4 tabs. Here i am confused on how to add the login view controller even before the TabBar controller is loaded. I want the first tab to be selected every time. As of now i am adding my TabBar controller as a rootviewcontroller to my AppDelegate window and then presenting the login view controller as a modal view controller. But the problem here is even before the Login View controller is loaded, my courses view controller is loaded because the tabbarcontroller is loaded first. My actual requirement is i need to load the course view controller with the list of courses based on the inputs given in the Login View controller. But loadview of course view controller is loaded even before the load view of login view controller. so my list of courses is always the same irrespective of who logs in. I am confused here on how to move forward…Any suggestion here would be of great help…

  • 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-06-04T14:44:05+00:00Added an answer on June 4, 2026 at 2:44 pm

    So, a very quick example, could be; in your loginViewController you should have some method something like this:

    //Call this after the user has done with the login
    -(IBAction)remove:(id)sender{
        AppDelegate *del=(AppDelegate*)[[UIApplication sharedApplication] delegate];
        //Set some data based on the user's input (eg some property shared in the AppDelegate)
        //del.dataEnterByTheUser=someData;
        [del removeLoginView];
    } 
    

    Then in your AppDelegate (assuming that now the rootViewController is the loginViewController) you could do like this (you can optimize the transition):

    -(void)removeLoginView{
    
        UITabBarController *tabVC=[[UITabBarController alloc] init];
        ViewController *v1=[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
        //v1.data=self.dataEnterByTheUser;
        ViewController *v2=[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
        NSArray *arrayVC=[NSArray arrayWithObjects:v1,v2, nil];
        [tabVC setViewControllers:arrayVC];
        [tabVC setSelectedViewController:0];
        CGRect rectVC=self.loginViewController.view.frame;
        rectVC.origin.y=self.view.frame.size.height;
        [UIView animateWithDuration:0.3f delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
            self.loginViewController.view.frame=rectVC;
        } completion:^(BOOL finished){
            [self.loginViewController.view removeFromSuperview];
            self.loginViewController=nil;
            self.window.rootViewController=tabVC;
        }];    
    }
    

    Also remember to set in each viewControllers’s initWithNibName: the self.title to set the title on the tabItem.

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

Sidebar

Related Questions

I am developing client-server application in Java which need user login. For that I
While developing my WordPress application i have a requirement where i need to show
I am developing one Blackberry application using Eclipse, I need to show images in
I am developing an iPhone application in which I need to show an image
I'm developing a MVC application and I need to show an image in the
I'm developing Silverlight OOB application and I need to show web pages in it
I'm developing an application for my company in which i need to show one
I`m developing this application that need to read every key stroke while the application
Hi I am developing a android application to show the digital clock.But I need
I'm developing an application where i need to create pdf file based on user

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.