First - I read all similar topics and non of them work for me. I have few View Controllers. And I change them by that code:
- (void)flipToAzbukaMenu {
AzbukaMenuController *aAzbukaMenu = [[AzbukaMenuController alloc] initWithNibName:@"AzbukaMenu" bundle:nil];
[self setAzbukaMenuController:aAzbukaMenu];
[aAzbukaMenu release];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:window cache:NO];
[viewController.view removeFromSuperview];
[azbukaArcadeController.view removeFromSuperview];
[self.window addSubview:[azbukaMenuController view]];
[UIView commitAnimations];
}
Also I have proper key in plist that allows me to start the application in landscape mode. When the app starts it has proper orientation (landscape), but when I change my view it becomes portrait and becomes again landscape only after rotating device 270 degree (not 90 lol). How do I force the app to show all views in landscape mode?
UPD:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if ((interfaceOrientation==UIInterfaceOrientationPortrait)||(interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown))
{
return NO;
}
if ((interfaceOrientation==UIInterfaceOrientationLandscapeLeft)||(interfaceOrientation==UIInterfaceOrientationLandscapeRight))
{
return YES;
} else {
return YES;
}
}