Xcode 4.5
Application for iPad device.
For iPad Master View controller application, Master view controller disappears after tapping an item and quickly changing orientation from portrait to landscape mode.
I used Default template for Master-Template application for iPad. In portrait mode (iPad) I tapped "+" button on Master controller and added multiple items around 10. After that I tapped one of the highlighted item in the Master Controller (refer screen shot) then QUICKLY changed the orientation from portrait to landscape. In landscape mode Master Controller disappears and blank (black) screen appears.
I analysed it further and found issue in following line of code
[self.masterPopoverController dismissPopoverAnimated:YES];
in DetailViewController.m
- (void)setDetailItem:(id)newDetailItem
{
if (_detailItem != newDetailItem) {
_detailItem = newDetailItem;
// Update the view.
[self configureView];
}
if (self.masterPopoverController != nil) {
[self.masterPopoverController dismissPopoverAnimated:YES];
}
}
If I pass NO to [self.masterPopoverController dismissPopoverAnimated:NO];
then everything works just fine.
How to solve this issue?
Thank you