I can receive UIDeviceOrientationDidChangeNotification
event, if auto-rotation is set.
But when screen auto rotation is disable, orientation notification doesn't work any more.
The effect I want to achieve is as iPhone Camera and Camera+: whatever the user lock or not lock the screen rotation, application can correspond to the rotation change immediately and correctly.
Does anyone has any idea why notification not sent when user lock the screen rotation? How could I correspond to the device orientation change even if auto-rotation is disabled?
Method two: Disable Auto-rotate from Display Settings Right-click the Desktop, then select Display settings. Under Display, switch Lock rotation of the display to off to lock the auto-rotation.
Enable Auto rotate Next, you'll have to check if you have turned on the autorotate feature, and it is not locked to portrait only. You can find this feature in the Quick Settings menu. If you see a Portrait icon, then it means auto-rotate is disabled, and then tap it to enable the auto-rotate.
Screen orientation lock For Android, open the AndroidManifest. xml file and within the activity element add 'android:screenOrientation="portrait"' to lock to portrait or 'android:screenOrientation="landscape"' to lock to landscape.
For Android users: Swipe your finger down from the top of the screen to bring up your quick settings toolbar. You will have an option for rotation that can be tapped to turn off the rotation lock.
Checking screen rotation settings. 1 Use the Windows key + A keyboard shortcut to open Action Center. 2 Click the Expand button. 3 Click the Rotation lock to turn it off. 3.1 Quick Tip: You can also control this option under Scale and layout on Settings > System > Display.
If this is the case, do the following: Use the Windows key + A keyboard shortcut to open Action Center. Click the Expand button. Click the Rotation lock to turn it off. Quick Tip: You can also control this option under Scale and layout on Settings > System > Display. Change the orientation of the device to see if it rotates automatically.
Fix Android Screen Auto Rotate Not Working 1 Restart your Android phone. Most of the time a simple restart can fix all the issues your phone is facing. ... 2 Enable Auto rotate. ... 3 Allow home screen rotation. ... 4 Check rotate settings in the app. ... 5 Calibrate phone’s sensors. ... 6 Uninstall recent apps. ... 7 Update your smartphone. ...
Note: If you create a Tablet app and turn off the "Lock orientation" option, when you put your Mobile device in portrait orientation, the app would be displayed in portrait layout, but the app would not be responsive to the portrait layout automatically.
I also want to get the effect of the Camera app, where the app detects the orientation of the device even if the user has set Portrait Orientation Locked. UIDeviceOrientationDidChangeNotification
is not posted when the user has portrait orientation locked. I believe the only way to determine the orientation of the device when the user has locked the orientation to portrait is to manually work out the orientation using UIAccelerometer
.
The list of questions & answers below are all related to this issue. I found them when I was searching for an answer, and you might find them helpful too.
Related questions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With