-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS 6 autorotation problem #33
Comments
autorotation is posing a problem for me, as well. I'd love to get more clarity on the topic. To add to your comment... The issue I'm currently facing is the container view controllers such as UINavigationController and my own implementation of ViewDeck controller. Parent controllers take precedence and the hierarchy's orientation handling isn't 100% clear. |
I got the same issue. Any solution for iOS 6? |
Yes, the solution that I decided upon, and which others have mentioned, is to presentViewController with your gallery view rather than push to your navigationController. Then you can use the shouldAutorotate and supportedInterfaceOrientations within the presented controller to set the supported orientations. Your whole hierarchy has to agree if you push to navigationControllers. |
Thanks. I think this is not a perfect solution but I can use it for the time being and I'll continue to investigate the problem and let you know if I find a "perfect" solution. 在 2012年10月20日,上午10:02,ccraigc [email protected] 写道:
|
I know what you mean. To explain a little further, you can accomplish what you're after by subclassing UINavigationController and overriding those methods I mentioned by returning their visibleController's supported orientations. Problem I ran into then was forcibly rotating back when popping or pushing other viewsControllers. It seems to disregard those settings until a rotation change is received. If you can figure out the rest I'd be interested in the solution. |
Can you please explain a little bit more on how to fix this issue? |
Solved
and in appDelegate change // [self.window addSubview:navigationController.view]; |
Hey guys, I have a solution if you have a UITabBarController with UINavigationController sub views. The trick is to subclass UITabBarController, then set your UITabBarController to use this class. Inside this subclass, add:
This will ensure that none of your views can rotate, except the FGalleryViewController. |
a1phanumeric your solution works but when you are in portrait mode on the gallery and come back to the previous viewcontroller (the one that pushed the FGalleryViewController) the view appears on portrait mode and all content is on the wrong place, is there a way that when you push the back button on the FGalleryViewController the content is displayed correct? Thanks. |
In
FGalleryViewController.m
the autorotation-methods for its parent controller have been overridden, which has worked wonderful until the recent release of iOS6.
Unfortunately, the images can no longer be rotated when the supported rotations have been set to, for example, only portrait. It seems like the method does not override this behavior anymore.
Did someone came up with a solution for this?
The text was updated successfully, but these errors were encountered: