Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: None  |  size: 0.84 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Presenting Modal View Controller in iOS not working
  2. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  3. {
  4. self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
  5. // Override point for customization after application launch.
  6. self.viewController = [[[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController" bundle:nil] autorelease];
  7.  
  8. self.window.rootViewController = self.viewController;
  9. [self.window makeKeyAndVisible];
  10. return YES;
  11. }
  12.        
  13. LoginViewController * loginViewController = [[LoginViewController alloc]initWithNibName:@"LoginViewController" bundle:nil];
  14.    [self.modalViewController presentModalViewController:loginViewController animated:YES];
  15. NSLog(@"HE::P");
  16.        
  17. [self presentModalViewController:loginViewController animated:YES];