Orientation Landscape iOS 5 on xCode 4.6

I want my app to be landscape. I tried everything, my storyboard's orientations are landscape, I changed the supported orientations and the initial orientation in info.plist. Can anyone help me?

In iOS 6 simulator it is landscape.

Answers


In iOS 5 you need to implement the following method in everyone of your view controllers.

// Called only in IO 5 and earlier.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
            interfaceOrientation == UIInterfaceOrientationLandscapeLeft );
}

And set UIInterfaceOrientation "Initial interface orientation " to UIInterfaceOrientationLandscapeRight in your Info.plist

And lay out your views in landscape mode.

Per Apple's developer docs


Need Your Help

How do I access Terminal's selected text using AppleScript?

terminal applescript

I've read through Terminal.app's dictionary and haven't seen a way to access just the selected text. Is this possible?

Given an R,G,B triplet and a factor F, how do I calculate a “watermark” version of the color?

language-agnostic colors watermark

I have an (R, G, B) triplet, where each color is between 0.0 and 1.0 . Given a factor F (0.0 means the original color and 1.0 means white), I want to calculate a new triplet that is the “watermarked”