- Sort Posts
- 15 replies
- Last post
problem with screen orientation in iOS6 - both iphone and ipad
problem with screen orientation in iOS6 - both iphone and ipad
Adding the setRootViewController did fix the camera view in my app. But I am still having trouble with other screens. I have added a navigation controller to the app and need to push other full screen view controllers onto the camera view. When I do that the new view controllers are rotated like the camera view used to be.
Here is my "Add the EAGLView code"
// Add the EAGLView and the overlay view to the window
arParentViewController = [[ARParentViewController alloc] init];
arParentViewController.arViewRect = screenBounds;
[window insertSubview:arParentViewController.view atIndex:0];
[window setRootViewController:arParentViewController];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:arParentViewController];
[navigationController setNavigationBarHidden:YES];
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
Thanks for any help you can offer, Chuck
problem with screen orientation in iOS6 - both iphone and ipad
Hi All,
If anyone is having problems here then please try this:
Add the line below:
[window setRootViewController:arParentViewController];
..and then crucially you need to highlight in XCode the orientations that the app supports i.e. click the buttons because these set up the info.plist which is fundamental to how the new orientations are handled by iOS6.
I did a quick test on an iPhone 5 and it makes all the difference, so please let us know how you get on with this.
N
problem with screen orientation in iOS6 - both iphone and ipad
Hi chuck,
At the moment the only way I know of to get this working on an iOS6 device properly is to build with XCode 4.4.1 and iOS5.1 SDK.
As I said we are looking into this matter, but because it's rooted in the core of how the iPhone deals with orientation, there may not be a quick fix.
N
problem with screen orientation in iOS6 - both iphone and ipad
I am experiencing the same problem with an app that was working fine when built under 5.1 sdk. My app is meant to be locked in Landscape Right orientation. I find if I change the angle for this orientation in handleARViewRotation to 90 instead of 0 I can get the camera view headed my way. Not sure if that helps, my app's main UI is still rotated (it is implemented in ARParentViewController). Anxious to hear what you come up with on this. iOS 6 working samples would be very helpful to show whatever work around you come up with.
Thank you, Chuck
problem with screen orientation in iOS6 - both iphone and ipad
problem with screen orientation in iOS6 - both iphone and ipad
Thanks for this guys.
After a bit of digging I can confirm there is an issue with Auto Rotation on iOS 6 if you build using the base SDK for iOS6 for deployment on iOS6 using XCode 4.5.
However, I tried the workaround suggested, but it did not work for me :(
....So can you please confirm your configuration? Base SDK / Deployment Target / Device
thanks,
N
BTW If one builds using 5.1 SDK using XCode 4.4.1 for deployment on iOS 5.1 it is ok
problem with screen orientation in iOS6 - both iphone and ipad
I've just found a solution!!
For example, in Dominoes app, in DominoesAppDelegate.mm; I've added the underlined sentence:
// Add the EAGLView and the overlay view to the window
arParentViewController = [[DomParentViewController alloc] init];
arParentViewController.arViewRect = screenBounds;
[window insertSubview:arParentViewController.view atIndex:0];
[window setRootViewController:arParentViewController];
[window makeKeyAndVisible];
This way, the interface responds to orientation changes.
problem with screen orientation in iOS6 - both iphone and ipad
Sorry, the screenshot:
http://i1261.photobucket.com/albums/ii583/diegovillaran/lafoto_zps7e596994.png
problem with screen orientation in iOS6 - both iphone and ipad
Hmmm - not sure what you mean
I just tested the dominoes sample from the 1.5.9 release on an iPhone 4S built with the latest SDK and XCode 4.5
..and it seems to run as expected when changing orientation.
Could you please post some screenshots so we can see what you are seeing?
thanks,
N
It's working for ios6.
[window setRootViewController:arParentViewController];