1

When I'm in landscape mode on iPad and trying to launch app I'm getting strange behavior: My root view controller view is created with dimensionality equal to 768x1024 whereas it should be 1024x768 (device is in landscape mode). Because of that my view hierarchy is corrupted.
View is created by the system (I'm using nib for interface).
Does it bug in iOS, or, maybe, I'm doing something wrong?

Edit: Autoresizing mask is default (everything resizes).

Alexander
  • 780
  • 1
  • 8
  • 22

2 Answers2

1

Found a solution here Reporting incorrect bounds in landscape Mode.
I was checking view controller view size in viewDidLoad, while correct sizes available only in viewDidAppear.

Community
  • 1
  • 1
Alexander
  • 780
  • 1
  • 8
  • 22
0

That is ok. It is always creates views in portrait orientation when perform rotation to lanscape. So U should implement - (BOOL) shouldAutorotateToInterfaceOrientation (UIInterfaceOrientation) - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation) And check in code

Anchor
  • 1
  • Both methods are implemented. Everything rotates normal. Problem only on first app launch in landscape (after killing app). My views are also rotated, but rootViewController.view has incorrect dimensionality. – Alexander Sep 24 '12 at 19:51