UIView Rotation No XIB
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.
精彩评论