ios 使用故事板进行景观设计

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8599195/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 15:59:46  来源:igfitidea点击:

Designing in landscape with Storyboards

iphoneiosinterface-builderstoryboard

提问by Dany Joumaa

Is it possible to design interfaces in landscape with Interface Builder? Others with the same question apparently were able to do so with an arrow at the top right of any selected view, but I see no such arrow. A picture would be helpful. (Note: I am using storyboards, not xibs.)

是否可以使用 Interface Builder 设计横向界面?其他有同样问题的人显然能够使用任何选定视图右上角的箭头来这样做,但我看不到这样的箭头。一张图片会很有帮助。(注意:我使用的是故事板,而不是 xib。)

回答by dasblinkenlight

Select the window in the storyboard, and open its Simulated Metrics property page (upper-right corner, an icon that looks like a shield next to the ruler icon). If the Simulated Metrics group is collapsed, expand it by clicking the black triangle to its left. There you will find an Orientation property; set it to Landscape.

选择情节提要中的窗口,然后打开其模拟指标属性页面(右上角,标尺图标旁边看起来像盾牌的图标)。如果 Simulated Metrics 组处于折叠状态,请单击其左侧的黑色三角形将其展开。在那里你会找到一个 Orientation 属性;将其设置为Landscape.

回答by cardmagik

The answer is correct, but I like a visual:

答案是正确的,但我喜欢视觉效果:

enter image description here

在此处输入图片说明

回答by Matt Plank

The answers above got me the answer, but I needed another step in Xcode 5. Instead of just clicking on my GLKView, I needed to select the GLKit View Controller property below the view. Then the Orientation appeared in the Attributes Inspector.

上面的答案为我提供了答案,但我需要在 Xcode 5 中执行另一个步骤。我需要选择视图下方的 GLKit 视图控制器属性,而不是仅单击我的 GLKView。然后方向出现在属性检查器中。

GLKView attributes

GLKView 属性

回答by D. Scott

For Xcode 8 - Click the View Astext at the bottom of the storyboard:

对于 Xcode 8 - 单击View As故事板底部的文本:

Storyboard to landscape

故事板到风景