I’m developing UISplitViewController application, Master view is embedded into Navigation Controller.
Every time I segue in Master to a new GroupsViewController and then press “back” button, my GroupsViewController moves to the center of screen and the whole SplitViewController covers it vertically from top:

It happens only in landscape orientation. In portrait everything works fine.
The segue is from NavigationBarButton to a GroupsViewController
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"ShowGroupsSegue"])
{
GroupsViewController *groupsController = (GroupsViewController *)[segue destinationViewController];
groupsController.contactsdelegate = self;
}
}
Any suggestions how can I fix that?
I got it working by making sure that relevant class was returning
YESin(BOOL)shouldAutorotateToInterfaceOrientationfor all orientations on iPad.I have a universal project, so that particular class was still set to the appropriate iPhone settings (return YES only to
UIInterfaceOrientationPortrait).