I am trying to rotate a UIViewController by 180 degrees programmatically. Let’s say I hit a “Rotate” button. That said button should rotate the screen and it’s content by 180 degrees. My iOS Target has only Portrait as the supported interface orientation under deployment info. Would this be an issue?
Thanks!
You can rotate the
UIView(not the controller) by assigning a rotation transformation to itsCALayer‘stransformproperty.However, remember, that the orientation will remain in portrait, and the status bar will not rotate with the view.
There is no public API for setting the device’s UI orientation. If you do not care about public API and appstore compliance, there is
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait];