Tim Tuffley
Tim Tuffley

Reputation: 595

UISplitView Landscape Mode

I have downloaded an example code from here and tested it out. The thing I wasn't able to understand is that when I set the orientation to Landspace only and run it in Portrait mode, nothing changes.. I mean I should still be able to see the menu on left and the Psychologist button shouldn't be there.

PS: With iOS6, it is working well but lower versions giving me the same result.

Upvotes: 2

Views: 103

Answers (1)

Daniel
Daniel

Reputation: 23359

It looks like in the RoatatableViewController.m file the method

- (BOOL)shouldAutorotateToInterfaceOrientation:

Is telling the app that rotation is okay in all directions.

You should use this to block to landscape mode for iOS 5 and older:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

It just looks like the person who made this project up in Stanford overlooked this.

Upvotes: 1

Related Questions