I have a main view that I rotate to landscape using
-(void)viewDidLoad {
self.view.transform = CGAffineTransformMakeRotation(90);
self.view.bounds = CGRectMake(-0.0, 0.0, 480.0, 320.0);
It works great. The problem is that this view can call a modal view, and when I dismiss the modal view the main view returns to portrait. Any ideas why this happens and how can I fix it?
Are you overriding
shouldAutorotateToInterfaceOrientation:in your main view and returningYESfor any orientation? If not, your main view thinks that it can only support portrait mode, and will autorotate back to portrait whenever it comes to the front.