Auto screen rotation


Anyone knows how to auto rotate iphone’s screen such as other iphone apps?


1 Like

I have the same question.

Even if you set settings.enableHardwareOrientation to true in, and checked all 4 orientation on “Deployment Info” in Xcode, with all 4 items in “Supported interface orientations (iPhone)” on ofxiOS-Info.plist, an iPhone’s native device orientation never rotates.

I mean, ofApp::deviceOrientationChanged(){} fires correctly, and inner orientation of ofApp can be changed by ofSetOrientation(), but iPhone’s native home bar never moves from the bottom of default portrait orientation.

Surprisingly, in iPadOS auto rotate works fine (home bar position changes) so this is iPhone-only issue.

I’ll omit example code because you can check it with some plane project, like iosOrientationExample (which is not working).

I am wasting my days and needs somebody’s help.