I have an universal app with a splitcontroller and a modal that is showing modally from the viewdidload of the detailcontroller (its a login screen)
When opening the ipad version, I want to be able to launch it on portrait or landscape depended on the initial orientation of the device. The problem is that its always launching as portrait (expected acording to documentation).
If I have the device as portrait and then turn if landscape, it works. But if I open the app directly landscape it doesnt.
BTW: I already set return true
at (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
of that login viewController
update: If I perform the segue from viewDidAppear instead of viewDidLoad, the orientation of the modal works correctly but the SplitController is seen for a while before the modal, how can I avoid this?
- (void)viewDidAppear:(BOOL)animated
{
[self.splitViewController performSegueWithIdentifier:@"toModal" sender:self.splitViewController];
}