Search code examples
iphoneiosxcodeuiinterfaceorientation

how to set Orientation after launch on iPhone


i Will like to know how to auto rotate iphone after launch.

my launch image is in portraits but the app itself are in landscape.

after launch the orientation are still in portraits instead of auto rotate to landscape.

this is my info.plist

enter image description here

in my root view controller

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));

}

Solution

  • enter image description here

    as shown in the image, set the marked value for landscape mode..