Don't autorotate view controller, but show UIAlertView rotated
-
22-01-2021 - |
Question
Is it possible to show a UIAlertView
rotated to the device's current orientation inside a UIViewController
that always returns NO
in shouldAutorotateToInterfaceOrientation:
?
Solution
You can rotate the view after showing it depending on the orientation of the device, using this:
alertView.transform = CGAffineTransformRotate(alertView.transform, degreesToRadian(90));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow