views:

153

answers:

1

After a login screen which sends the username/password to a webservice and gets back a response of either true(which is supposed to start the rest of the app) or false(incorrect username/password or unauthorized). The app gives the alert view that you are authenticated but it doesnt load the rest of the view?

if ([soapResults isEqualToString: @"true"])
 {
  UIAlertView *welcome = [[UIAlertView alloc] initWithTitle:@"Welcome!" message:@"Welcome, You are now authenticated to a Coyote Logistics application." delegate:self cancelButtonTitle:@"OK",nil otherButtonTitles:nil];
        [welcome show];
  [welcome release];
  [soapResults release];
  soapResults = nil;
  [loginIndicator stopAnimating];
  loginIndicator.hidden = TRUE;
  loggedinLabel.text = usernameField.text;
  loggedinLabel.textColor = [UIColor blackColor];
  NSLog(@"Valid Login"); 
  FeedsViewController *fvController = [[FeedsViewController alloc] initWithTitle:@"LoadBoard" withNavigationTitle:@"Available Loads" withPropertyFile:@"feeds.plist"];
  AboutViewController *avController = [[AboutViewController alloc] init];
  SettingsViewController *svController = [[SettingsViewController alloc] init];
  UINavigationController *fvNavController = [[UINavigationController alloc] initWithRootViewController:fvController];
  UINavigationController *avNavController = [[UINavigationController alloc] initWithRootViewController:avController];
  UINavigationController *svNavController = [[UINavigationController alloc] initWithRootViewController:svController];
  UITabBarController *tbController = [[UITabBarController alloc] init];

  fvNavController.navigationBar.tintColor = [UIColor colorWithRed:0.14 green:0.18 blue:0.25 alpha:1.00];
  avNavController.navigationBar.tintColor = [UIColor colorWithRed:0.14 green:0.18 blue:0.25 alpha:1.00];
  svNavController.navigationBar.tintColor = [UIColor colorWithRed:0.14 green:0.18 blue:0.25 alpha:1.00];


  [[fvController tabBarItem] setImage:[UIImage imageNamed:@"rss.png"]];

  tbController.viewControllers = [NSArray arrayWithObjects:fvNavController, avNavController, svNavController, nil];

  // Configure and show the window
  [window addSubview:tbController.view];
  [window makeKeyAndVisible];
  [LoginViewController release];
 }

PLEASE HELP ME OUT

+1  A: 

What happens when you disable the showing of the UIAlertView? If it loads correctly, you might want to consider moving the showing of the UIAlertView in the viewdidload method of the first visible viewcontroller.

WardB