0

I have a problem about landscape orientation I don't use storyboard. In *.codeproj summary Supported interface orientation "Landscape left and right selected"

In AppDelegate.m I used the method

-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window

{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
        return UIInterfaceOrientationMaskLandscape;
    else  /* iphone */
        return UIInterfaceOrientationMaskAllButUpsideDown;
}

In ViewController.m I used the method

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape;
}

In viewcontroller.xib all the view (UIVIEW class) are:

Simulated Metrics
Landscape

In my viewController i have somes views (UIVIEW class) defined in viewController.m

The main view open correctly when I launch the application, but the other view open the first time in portrait mode, after when I rotate the IPAD the view change in landscape mode.

I would like that all the view open in landscape mode first time

I tried to change the method

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscapeRight;
}

but with this method the view never change and it stay in portrait mode

The main view appear always correctly in landscape mode, the problem is in other view.

Shimon Rachlenko
  • 5,469
  • 40
  • 51
FabioN1975
  • 45
  • 1
  • 1
  • 3

0 Answers0