views:

41

answers:

0

I'm writing a game, in which I will be swapping out views. I have a loading screen which comes out in LandscapeRight mode, which is what I want. Then I want all subsequent views to load in Landscape. What ends up happening is that they load in Portrait (even though in IB I have them edited as Landscape views and the size dimensions are 300x480). Can anyone help me understand what I'm doing wrong? Because of this, I am not able to do animations between the screens like I would like to do.

-(IBAction)buttonPressed:(id) sender
{
 [UIView beginAnimations:@"View Flip" context:nil];
 [UIView setAnimationDuration:0.15];
 [UIView setAnimationTransition:
 UIViewAnimationTransitionFlipFromLeftforView: self.view cache:YES];

 if(sender == deletebutton)
 {
  self.view = self.game;
  self.view.transform = CGAffineTransformIdentity;
  self.view.transform = CGAffineTransformMakeRotation(-1.57079633);
  self.view.bounds = CGRectMake(0.0, 0.0, 480.0, 300.0); 
 }

 [UIView commitAnimations];
}

That rotation code is needed, but I would like to get rid of it if possible, because it makes my animations not work. Thanks a lot. -Joe