Reputation: 3014
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?
Upvotes: 3
Views: 301
Reputation: 18470
YOU saved my day, and one more thing, for anyone has a problem like this, make sure that ALL you UIViewController's in navigation and tab controller have
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return YES;
}
Upvotes: 0
Reputation: 3014
I got it working by making sure that relevant class was returning YES
in (BOOL)shouldAutorotateToInterfaceOrientation
for 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
).
Upvotes: 5