You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the latest OF 0.9.0 nightly build 20150707 for iOS development.I found some problems regarding rotation on iOS8 based on iosOrientationExample.
First, these were my settings in main.h to experiment.(if I enable 'enableHardwareOrientationAnimation' then the rotation animation didn't work properly. It just sways a little bit. I don't know why there's this setting)
With these settings, everything seemed to work well on iOS7, but I found the following issues on iOS8.
When I build an app, it starts in a default orientation as it should be.
but if I move a device a little bit(not rotating), it rotates to the current orientation unnecessarily.
When I force to change the orientation using 'ofSetOrientation', It does rotate correctly from portrait to landscape mode but not from landscape to portrait mode. it still rotates, but to wrong coordinate so I could see a blank area in the top/right side of the screen.
Once I force to rotate the device using 'ofSetOrientation', and then if I try rotating the device into the orientation that is already set, it should not rotate again as it is already rotated, but it rotates again.
I could fix the problem 1 and 2, but I could never fix number3. It seemed like the rotation is happening out side of ofxiOSViewController.mm. But I couldn't find where it is actually happening.
So, these are the solutions I found at least for problem 1 and 2.
In ofxiOSViewController.mm file, around line127, you will find " - (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation".
Inside the function, below "pendingInterfaceOrientation = interfaceOrientation;" add "currentInterfaceOrientation = pendingInterfaceOrientation;"
I don't understand why it fixed the problem because there is already a code that does the same thing in line 216. but adding the code solved the problem anyway.
Also in ofxiOSViewController.mm file, around line 166, you will find this section.
Then it will work properly when you force to change the orientation.Now it should work well on both iOS7 and iOS8.I would appreciate if someone could fix the problem 3 for the perfection.Thanks!
The text was updated successfully, but these errors were encountered:
As reported on the forums here http://forum.openframeworks.cc/t/fixed-orientation-issues-on-ios8/20275 by @cuinjune
The text was updated successfully, but these errors were encountered: