I have a simple window based ipad app with no extra xibs or classes, just your app delegate .h and .m.
I have successfully added a UIView as a subview to 'window' but it has no rotation. How can I get a view added with working rotation. (No extra xib files if possible.)
Thanks.
You need a custom view controller for your view that implements the method shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
. Return YES
for every orientation you wish to allow rotation to.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.