Xcode 中的 UIView 设备旋转 iPad/iPhone?
我是 iPhone/iPad 开发新手,我在轮换中遇到问题。我想根据设备旋转 iPad/iPhone 旋转 UIView
,有时包含完整内容的大小和位置。请帮助我并给我示例代码或任何有用的链接。
谢谢..
I am new in iPhone/iPad development I am getting a problem in rotation. I want to rotate a UIView
according to device rotation iPad/iPhone with full content with the size and position sometimes. Please help me out and give me sample code or any useful link.
Thanks..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想根据设备旋转来旋转任何视图,只需转到 Interface Builder 并在尺寸检查器中设置视图尺寸,如下图所示。
或者,您可以使用代码进行设置,
If you want to rotate any view according to device rotation , Just goto Interface Builder and set the view sizes in the size inspector as shown in the following image.
or else, you can set using code,
转到界面生成器 ->尺寸检查器 -> 自动调整尺寸
选择所有外部条形并取消选择内部条形。 :-)
Go to Interface Builder -> Size Inspector ->AutoSizing
Select all the Outer Bars and Un-select the inner bars. :-)