Now that interfaceOrientation
propery in UIViewController
is deprecated, what is the recommended way to detect current device orientation?
You can use [UIApplication sharedApplication].statusBarOrientation
Pay attention that [[UIDevice currentDevice] orientation]
is not exactly like your application rotation. The docs:
Discussion: The value of the property is a constant that indicates the current orientation of the device. This value represents the physical orientation of the device and may be different from the current orientation of your application’s user interface. See UIDeviceOrientation for descriptions of the possible values.
I would check if the statusBarOrientation works.
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