project_files/HedgewarsMobile/Classes/MainMenuViewController.m
changeset 3525 1d7b056ff866
parent 3522 156c04c6a3d8
child 3535 9e78c1f3d8d8
equal deleted inserted replaced
3523:6592fbb969da 3525:1d7b056ff866
    99 
    99 
   100 #pragma mark -
   100 #pragma mark -
   101 -(IBAction) switchViews:(id) sender {
   101 -(IBAction) switchViews:(id) sender {
   102     UIButton *button = (UIButton *)sender;
   102     UIButton *button = (UIButton *)sender;
   103     UIAlertView *alert;
   103     UIAlertView *alert;
   104     NSString *debugStr, *configNibName;
   104     NSString *debugStr;
   105 
   105 
   106     switch (button.tag) {
   106     switch (button.tag) {
   107         case 0:
   107         case 0:
   108             // bug in UIModalTransitionStylePartialCurl, displays the controller awkwardly if it is not allocated every time
   108             gameConfigViewController = [[GameConfigViewController alloc] initWithNibName:@"GameConfigViewController" bundle:nil];        
   109             if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
       
   110                 configNibName = @"GameConfigViewController-iPad";
       
   111             else
       
   112                 configNibName = @"GameConfigViewController-iPhone";
       
   113             
       
   114             gameConfigViewController = [[GameConfigViewController alloc] initWithNibName:configNibName bundle:nil];        
       
   115 #ifdef __IPHONE_3_2
   109 #ifdef __IPHONE_3_2
       
   110             // bug in UIModalTransitionStylePartialCurl, displays the controller awkwardly if it is not allocated every time            
   116             if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
   111             if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
   117                 gameConfigViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
   112                 gameConfigViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
   118 #endif
   113 #endif
   119             [self presentModalViewController:gameConfigViewController animated:YES];
   114             [self presentModalViewController:gameConfigViewController animated:YES];
   120             break;
   115             break;