0
votes

I settings my info.plist as below:

  • Initial interface orientation: Landscape (left home button)
  • Supported interface orientations: Landscape (left home button) and Landscape (right home button)

When I started my app, the orientation device have landscape mode, but my view not rotate to this orienatation.

I use method below for rotate orientation, but view not initial in landscape mode (after I have rotate my device in this case I had needed result - view rotate in landscape mode)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
1
This may be obvious but are you using a view in IB and if so have you set its class? Long shot but not sure what else to go on here if you have more info I will help.Scott Sherwood
ok, thanks for response. in my case all works good on device only, but on simulator I get this strange behavior and I don't know how to solve this problem.Matrosov Oleksandr

1 Answers

1
votes

I've had a couple of issues with this in the past. Basically if you just put the initial view controller there it bugs out handling as if it was in portrait mode. The fix i found for this was adding the view controller to a navigation controller.

See this question i posted for the full explanation