Landscape Layout not working correctly in iPad with iOS 5.1 #14

josea opened this Issue Feb 27, 2013 · 6 comments


None yet

2 participants



I took the master branch demo, and added the shouldAutorotate... method below to the OLViewController.m to allow it rotate.

It rotates, but it doesn't work correctly: the alert popups are still displayed like the iPad was in portrait mode. It is like the view is missing a transformation.

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; }

Note: maybe related: I have to add this to may .pch to resolve compiling issues:

#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type


Note: if you add this to the show method it will work "correctly" when in landscape. However, the rotation doesn't work fine.

self.transform = window.rootViewController.view.transform;
self.frame = CGRectMake(self.frame.origin.y, self.frame.origin.x, self.frame.size.width, self.frame.size.height);
Onda member

Sorry about that. Broke this with commit 0aa66de. Looking into it.


I noticed that you are adding the "ghost view" to the Window. I do not know if you did that in the previous versions, but the Window doesn't have the rotation transformation (not sure if that helps).

Onda member

That's exactly the issue. I'll try to fix this today or tomorrow. Adding as a subview of the window was issue #1, and I rushed to fix it because of #11. Not sure if I'll revert to adding it as a subview of the Root View Controller (or Presented VC if there is one) or just manually transform it.

Onda member

I promise I won't promise any more ETAs. This fix is coming someday.

@radutzan radutzan added a commit that closed this issue Apr 23, 2013
@radutzan radutzan Fixed orientation bugs (fix #14) by not adding OLGAV as a subview of …
…the window.

Trust me, I tried. I really tried. In the process, OLGAV got slightly more awesome by making extensive use of layoutSubviews. This change, ironically, improves OLGAV's behaviour when rotating by a lot, since it now recalculates all frames to adapt to the new size. Hooray?
@radutzan radutzan closed this in 76d0973 Apr 23, 2013

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment