gabaum10
gabaum10

Reputation: 3827

iPad popover view rotation

So I have a popover being presented from a barbutton. However I am having some rotation issues when a modal view is being displayed over it. The view inside the popover is not rotating properly. I have all of the delegates set to yes, so it should automatically handle this. This is only happening when that modal view is being displayed over it. Is it possible to dismiss the popover when the user selects an item from the table inside the popover? Thanks!


UPDATE: So I figured out how to dismiss the popover by keeping a reference via a delegate. This did not fix the rotation problems. Does anyone have any idea what may be causing this? Thanks

Upvotes: 1

Views: 1603

Answers (2)

Bryson
Bryson

Reputation: 11

Implementing:

- (BOOL)automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers {
    return YES;
}

in my view controller fixed the problem.

Upvotes: 1

davydotcom
davydotcom

Reputation: 2210

Modal View Controllers override the rotation capabilities of its parent View

Add the following function to your ModalViewController

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}

Upvotes: 0

Related Questions