I want to turn off the default rotate animation when iOS device orientation changed.
I assumed settings.enableHardwareOrientationAnimation = false; in main.mm is there for that, but I see no changes between true and false (rotate animation is always ON).
Also, I tried some modifications on ofxiOSViewController.mm reffering to this article : added following code to top of the - (void)viewWillTransitionToSize:(CGSize)size function.
But it didn’t work. I still have no idea what’s happening and even whether my translation from Swift into Objective-C is right (because I’m completely new to C language).
Does anyone have suggestions?
P.S. I’m trying this on iPad. On iPhone, the ViewController don’t even rotate, which is another issue.
Just had a play. Am running of 0.11.2 on iOS 15.5 on a 13 Pro Max and 10.5 iPad Pro.
I had the same result on both (as well as an iPad Air simulator).
With both set to true,
settings.enableHardwareOrientation = true; // enables native view orientation.
settings.enableHardwareOrientationAnimation = true; // enables native orientation changes to be animated.
and the device starting in portrait, I get no rotation (I do get ofApp::deviceOrientationChanged() firing though).
But if the app starts when the device is in landscape, it will animate it’s rotation to portrait then get stuck there.