在 Xcode Interface Builder 中 - 为什么编辑器--->排列菜单(包含发送到前,发送到后)中的选项经常被禁用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18194777/
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
In Xcode Interface Builder - why are the options in the Editor--->Arrange menu (containing Send to Front, Send to Back) often disabled?
提问by darkheartfelt
What I'm trying to do is simple: bring a label in front of an image within a subview.
我想要做的很简单:在子视图中的图像前面放置一个标签。
But all of the options for arranging are disabled/un-selectable when my label is selected. I find this happens often.
但是当我的标签被选中时,所有的排列选项都被禁用/不可选择。我发现这种情况经常发生。
What could be the reason that I'm almost never allowed to change the z-axis of my objects in the Arrange menu? Is it a better practice to avoid this feature and set the order of views programmatically?
几乎不允许我在“排列”菜单中更改对象的 z 轴的原因是什么?避免此功能并以编程方式设置视图顺序是否是更好的做法?
采纳答案by Shyam Bhimani
It happens sometimes. In that situation, click the view or image you want to send back then you will see little square box at the edges of image from which you can re size your image, Just click on it once and then go to Editor> Arrange> Choose option according your need.
它有时会发生。在这种情况下,单击要发回的视图或图像,然后您会在图像边缘看到小方框,您可以从中调整图像大小,只需单击一次,然后转到编辑器>排列> 选择选项根据您的需要。
回答by Wain
It can depend on how you have selected the label (similar to how the label can only be moved with the keyboard when selected in some ways).
这可能取决于您选择标签的方式(类似于只有在以某些方式选择时才能使用键盘移动标签)。
A simple alternative is to look at the list of view in the pane on the left and to drag the views up and down to change the order.
一个简单的替代方法是查看左侧窗格中的视图列表,然后上下拖动视图以更改顺序。