Open thehappycoder opened 7 years ago
Add this
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
before calling
[[UIDevice currentDevice] setValue: ];
and
while ([[UIDevice currentDevice] isGeneratingDeviceOrientationNotifications]) {
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
}
before
return [Orientation getOrientation];
in AppDelegate's application supportedInterfaceOrientationsForWindow
@thehappycoder make a PR :D
As I saw there were no PR for this issue, I got the solution from @thehappycoder and created one. Hope you don't mind..! The pull request is the #247.
I still get this issue on 3.1.3. First workaround works
I have two components. One of them (B) locks to portrait and the other one (A) -- to landscape right.
To reproduce:
Expected
Actual
Workaround
If I want to lock the orientation and also make sure that interface is autorotated, I lock orientation to opposite value first: