开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜