Interface Builder /将UIButton放在UIImageView前面(当在UImageView之前创建了UIButton ...) [英] Interface Builder / Putting UIButton in front of UIImageView (when UIButtons have been created before UImageView...)

查看:117
本文介绍了Interface Builder /将UIButton放在UIImageView前面(当在UImageView之前创建了UIButton ...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Interface Builder在视图中定义了几个按钮。现在,我想在这个视图中添加一个UIImageView。我们的想法是在已有的按钮后面显示UIImageView。我在视图中删除了一个新的UIImage视图但奇怪的是,我无法将图像显示在按钮下面(按钮被新鲜的UIImageView隐藏)。当我将旧按钮移动到UIImageView上时,它们仍然在它们前面,但我想还有另一种方法可以达到我想要的效果。每个对象都没有前景/背景级别的概念吗?我也注意到删除一个新按钮工作正常。但我不想重新定义我现有的所有按钮,因为它们已连接到我的代码。

I have already defined several buttons in a view with Interface Builder. Now, I would like to add an UIImageView in this view. The idea is to have the UIImageView display behind the already existing buttons. I have dropped a new UIImage View in the view but curiously, I cannot get the image appear under the buttons (buttons are hidden by the fresh UIImageView). When I move my old buttons onto the UIImageView, then they remain in front of them but I guess there is another way to reach what I want. Is not there a concept of "foreground/background level" for each object ? I also noticed that dropping a new button works fine. But I do not want to redefine all my existing buttons are they are already connected to my code.

感谢您的帮助

Apple 92

推荐答案

您只需打开IB的文档窗口(单击窗口 - >文档) 。

You can just open the Document window of the IB (Click on Window--> Document).

打开后,展开视图块并拖动刚刚添加到列表中的UI按钮上方的UIImageView。这将是必要的

Once opened expand the view block and drag the UIImageView just added above the UIbuttons previously added in the list. This will do the needful

希望这会有所帮助!!

Hope this helps!!

这篇关于Interface Builder /将UIButton放在UIImageView前面(当在UImageView之前创建了UIButton ...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆