Hi Guys,
Here is my problem: - I have one navcontroller and inside it one tabbar controller with 4 view controller. - I want to add following functionality: - On landscapeRight to dismiss navcontroller, tabbar controller and everything and load whole new controller - this one goes ok, here is the code:
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
// Just delete the lines for the orientations you don't want to support
if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
[appDelegate ToHorizontalAverageResponseView:self];
}
return YES;
}
Here is the code in the App Delegate:
- (void)ToHorizontalAverageResponseView:(id)sender
{
HorizontalResponseViewController *tempController = [[HorizontalResponseViewController alloc] initWithNibName:nil bundle:nil];
[self setHorizontalResponseViewController: tempController];
[tempController release];
//[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;
// View rotation transformation
CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation( M_PI * 90.0 / 180.0 );
[[horizontalResponseViewController view] setTransform:landscapeTransform];
[window addSubview:[horizontalResponseViewController view]];
}
The question is how to transfer back to portrait view and all those navbar and tabbar controllers?
Thx, Mladen