Interface Builder / Putting UIButton in front of UIImageView (when UIButtons have been created before UImageView…)

有些话、适合烂在心里 提交于 2019-12-11 08:45:47

问题


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.

Thanks for your help

Apple 92


回答1:


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

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!!



来源:https://stackoverflow.com/questions/4984690/interface-builder-putting-uibutton-in-front-of-uiimageview-when-uibuttons-hav

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!