如何在 xcode 4.6.2 中更改故事板的背景颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16933348/
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
How do I change background color of storyboard in xcode 4.6.2
提问by Herbie999
I am working with storyboards in xcode 4.6.2 I simply want to change the background color of the storyboard. Usually I would think (and according to tutorials) I just go to the inspector on the right and there's a drop down to change the background color. However it's not showing up. Instead I see too areas, "simulated metrics" which shows drop down for size, orientation, status bar, top bar and bottom bar and "view controller" which shows title, initial scene check box layout check box which offers wants full screen, hides bottom bar and resize options and transition and presentation style check boxes. Any one know why I don't see anything for changing background color etc.. am I missing something here? Any help would be greatly appreciated.
我正在使用 xcode 4.6.2 中的故事板,我只想更改故事板的背景颜色。通常我会认为(并且根据教程)我只是去右边的检查员那里有一个下拉菜单可以更改背景颜色。然而它没有出现。相反,我看到了一些区域,“模拟指标”显示大小、方向、状态栏、顶部栏和底部栏的下拉菜单和“视图控制器”显示标题、初始场景复选框布局复选框提供想要全屏、隐藏底部栏和调整大小选项以及过渡和演示样式复选框。任何人都知道为什么我没有看到任何改变背景颜色等的东西......我在这里错过了什么吗?任何帮助将不胜感激。
回答by Valent Richie
You are most probably clicking on the view controller which is showing those properties that can be adjusted in the view controller itself. This can be found out on the left of the storyboard or Interface Builder.
您很可能点击了视图控制器,它显示了可以在视图控制器本身中调整的属性。这可以在故事板或界面生成器的左侧找到。
A view is not the same as view controller. A view controller manages a set of views, as mentioned in the View Controller Programming Guide for iOS.
视图与视图控制器不同。视图控制器管理一组视图,如iOS的视图控制器编程指南中所述。
Try to click on the view of the view controller and you should be able to modify the background color of the view:
尝试单击视图控制器的视图,您应该能够修改视图的背景颜色:
回答by Ashley Proctor
Select the view under the view controller in the storyboard panel. Then go to the Attributes Inspector. Backgorund is about the 4th item down.
在故事板面板中选择视图控制器下的视图。然后转到属性检查器。Backgorund 大约是第四项。