Ladessa
Ladessa

Reputation: 1003

View in landscape appears as portrait

I have a application that run in landscape mode only...it works great, but I did create another view in my application and his xib is "landscape", didn't use autolayout and did implement shouldAutoRotate in my controller..but when I enter on this view, the view is completely different from xib

 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return ((toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight));
} 

The xib's print http://imageshack.us/photo/my-images/38/3t2b.png/

The ipad's print http://imageshack.us/photo/my-images/196/nqku.png/

Upvotes: 0

Views: 55

Answers (2)

Ladessa
Ladessa

Reputation: 1003

I solve my problem using:

[self presentViewController:_inAppPurchaseView animated:FALSE completion:nil];

instead of:

  [self.window addSubView:_inAppPurchase.view];

Upvotes: 0

Aditya Deshmane
Aditya Deshmane

Reputation: 4722

In info plist check values of

Supported interface orientations

Keep only these two items

  1. Landscape (left home button)
  2. Landscape (right home button)

Upvotes: 1

Related Questions