Can’t disable HardwareOrientationAnimation

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.

    [coordinator animateAlongsideTransition:nil completion:
         ^(id context){[UIView setAnimationsEnabled:true];}];
    [UIView setAnimationsEnabled:false];
    [super viewWillTransitionToSize: size withTransitionCoordinator: coordinator];

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.

Curious you had it rotate ok on iPad, what iOS version / model are you on?

Hi!
I am running of_v0.11.2_ios on
・iPad Pro (2nd gen.) with iPadOS 14.4.1 —> can rotate
・iPhone 12 mini with iOS 15.5 —> can’t rotate

Yeh seems like an iOS 15 thing then. Best to file a bug report.

Edit*
Ahh looks like it’s already in issues here: https://github.com/openframeworks/openFrameworks/issues/6965