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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:44:56+00:00 2026-05-13T05:44:56+00:00

I build my first iPhone application and I have a problem with switching views.

  • 0

I build my first iPhone application and I have a problem with switching views.
First, I have two views (login, registration) which switch via “presentModalViewController:animated:”.

But if someone logged in, there must be a new kind of view. I wanna have an UITabBar at the bottom (tab bar controller). But this does not work. I tried to create a new AppDelegate, so that I can use tutorials like this one which need a AppDelegate:

http://www.youtube.com/watch?v=LBnPfAtswgw&feature=player_embedded

The switch to the new controller is done like this:

startViewController = [[StartViewController alloc] initWithNibName:@"StartView" bundle:nil];
[UIView beginAnimations:@"View Curl" context:nil];
[UIView setAnimationDuration:2.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[self.view addSubview:startViewController.view];
[UIView commitAnimations];

The screen is white, because the shown view is the UIView in my StartView.xib. There I have the new AppDelegate, File’s owner, View, TabBarController. But only the UIView is loaded and not the TabBarController.

Do you have an idea how I could this problem?

Thanks & Best Regards.

  • 1 1 Answer
  • 1 View
  • 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-13T05:44:56+00:00Added an answer on May 13, 2026 at 5:44 am

    I might suggest you start with a TabBarController, and if the username/password is not set, the active ViewController executes presentModalViewController:animated: to display the login/registration viewsControllers in modal mode (hidding the underliying TabBarController).

    Here is some sample code for doing it programmatically.

    - (void)applicationDidFinishLaunching:(UIApplication *)application {    
     self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
     [window setBackgroundColor:[UIColor whiteColor]];
    
     tabBarController = [[UITabBarController alloc] init];
    
    
     aViewController = [[aViewController alloc] init];
     UINavigationController *aNavController = [[[UINavigationController alloc] initWithRootViewController:aViewController] autorelease];
     aNavController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
     [aViewController release];
    
     tabBarController.viewControllers = [NSArray arrayWithObjects: aNavController, nil];
    
     // Add the tab bar controller's current view as a subview of the window
        [window addSubview:tabBarController.view];
    
     if(userNotLoggedIn){
         [self displayLoginViewController];
     }
    
    
        [window makeKeyAndVisible];
    }
    
    - (void)displayLoginViewController {
     LoginViewController *controller = [[LoginViewController alloc] init];
     // setup controller
     [self.tabBarController presentModalViewController:controller animated:NO];
     [controller release];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.