从storyboard ios发回子视图 [英] send subview to back from storyboard ios

查看:251
本文介绍了从storyboard ios发回子视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法可以在所有其他视图上添加新的 imageView ,并将该视图发送到我的 viewController 直接来自 storyboard ?我不想在代码中创建 ImageView 并使用 sendSubviewToBack 方法。

解决方案

在Interface Builder中,选中左侧边栏,您将看到如下所示的视图层次结构。



只需按正常方式添加视图,然后将视图层次结构向上拖动到视图列表的顶部,它将位于堆栈的底部。



在下面的示例中根视图控制器视图中有一个容器视图,然后是图像视图,然后所有标签都位于该底部图像视图的顶部。 / p>


Is there a way that I can add new imageView over all other views and send that view to back of my viewController directly from storyboard? I don't want to create ImageView in code and use sendSubviewToBack method for that.

解决方案

In Interface Builder check the left sidebar and you will see the view hierarchy as shown below.

Just add your view as normal, then drag it up the view hierarchy to the top of the list in 'View' and it will be at the bottom of the stack.

In the example below There is a container view in the root view controller view then Image View and then all the labels are 'on top' of that bottom image view.

这篇关于从storyboard ios发回子视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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