I have a GLKViewController
with two views: a GLKView
and a transparent UIView
showing some commands.
The GLKViewController
supports two device orientations: portrait and landscape-right.
When the device is rotated from portrait to landscape I would like to:
- NOT rotate the GLKView;
- rotate the overlaid UIView with the commands.
Basically the GLKView should stay always in portrait, while the other view should follow the device orientation.
The GLKViewController is in a NavigationController. Either I need to have the NavigationController rotating in landscape or I need to implement a fake Navigation Bar and perform the 'pop' programmatically.
I saw a solution which simply rotated the view (after catching a notification), but I would like to keep the animation rotating that view.
I tried to use another UIViewController subclass, receiving the GLKViewController and the View with the commands as two child UIViewControllers but it did not work: the screen stayed black.