Reputation: 14418
I am presenting a UIModalView
in a UISplitViewApplication
. I have wired up a "done" action, which is:
- (IBAction) donePressed:(id) sender
{
[self dismissModalViewControllerAnimated:YES];
}
When I press the button, the orientation of the device changes to potrait mode. Why is this?
Upvotes: 0
Views: 270
Reputation: 4369
I had this problem and the accepted solution didn't solve it for me.
I was trying to load a modal view controller from a UIPopoverController, and every time it was dismissed it would rotate to portrait.
When I moved the modal view to load from the Detail View Controller of the UISplitView it worked fine.
Upvotes: 0
Reputation: 42574
I don't think you've provided enough code for anyone to be able to give you an accurate answer, but one possibility is that you haven't implemented the following method in all of your controllers:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
Upvotes: 1