UISplitViewController with modal segue not rotating
-
28-10-2019 - |
문제
I've created a project from the master detail template in Xcode 4.2/iOS5. I am trying to preform a modal segue from the splitviewcontroller. I call the following from my detailviewcontroller.m:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.splitViewController performSegueWithIdentifier:@"DisplayLoginView" sender:self.splitViewController];
}
The login view shows fine but it does not rotate and stays in portrait. Any ideas on how to get it to autorotate?
해결책
I fixed this by implementing a custom class for the destination view controller and adding the shouldAutorotateToInterfaceOrientation: method making sure it returned YES.
제휴하지 않습니다 StackOverflow