Contents of UIPopover change to random orientation when Modal View is visible and iPad rotated
I have a UITableView
within a navigation controller shown within a popover. When you press a bar button from within the popover (on a detail view), it shows a modal view. If you rotate the iPad with the popover visible and the modal view on top of that, the popover's content changes to a seemingly random orientation as shown below.
Any idea what's going on here?
UPDATE:
I'm trying to implement a solution, maybe there's a better way. When the modal view is dismissed, I send an NSNotification
from - (void)mailComposeController:(MFMailComposeViewContro开发者_运维知识库ller *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
to the popover's owner.
When I press cancel, the button is visibly pressed but nothing happens after that and the screen becomes unresponsive. However, rotation still occurs properly.
It would seem that I'm dismissing the popover before the modal view is dismissed. I don't really know any other way of doing this, you're continued help is appreciated.
I had to completely reload the popover and its view controllers. This is the only way I could mask the problem, not solve it, because this seems to be a bug in iOS 3.2.
Have you tried to dismiss the popover and then redisplay it? The UIPopoverController documentation is straightforward in saying that it will often fail to rotate a popover, and suggests redisplaying it as the only solution. I suspect that since your modal view is on top of the view from which the popover was displayed, the popover's controller is not updating its position & orientation.
精彩评论