777
777

Reputation: 79

Autorotate Modal view

I have created a modal view in Portrait mode. when it is in lanscape mode it is not rotating. How to rotate a modal view from Portrait to Lanscape in splitViewController?

Upvotes: 0

Views: 727

Answers (1)

Ri_
Ri_

Reputation: 662

I have a similar problem. The modal view is loaded from the DetailViewController, and when the iPad is rotated, the modal view disappears from view completely.

The closest I've come to a fix is, after rotating, to check whether a modal view was loaded, and then reload it, like so:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    if(self.modalViewController)
        [self.modalViewController.view.window reloadInputViews];
}

Upvotes: 1

Related Questions