如何将UIScrollView添加到“界面”构建器? [英] How to add UIScrollView to Interface builder?

查看:79
本文介绍了如何将UIScrollView添加到“界面”构建器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在界面构建器中放置了所有控件(许多标签,按钮等)。如何将它们全部放在界面构建器的滚动视图中,以便我可以拥有更多空间并能够向上和向下滚动以显示更多控件?我是否必须以编程方式执行此操作?

I have all my controls laid out in interface builder (many labels, buttons etc). How do I put them all in a scroll view in interface builder so that I can have more space and be able to scroll up and down to reveal more controls? Do I have to do this programatically?

推荐答案

打开包含所有控件和标签等的视图(在Interface Builder中) )。全选。然后在编辑器菜单下,选择嵌入,然后选择滚动视图。

Open the view that has all the controls and labels, etc. (in Interface Builder). Select All. Then under the Editor menu, select Embed In, then Scroll View.

注意:在较旧的Xcode版本中,这是在布局菜单下,然后嵌入对象... (滚动视图)。

Note: in older Xcode versions, this is under the Layout menu, then Embed Objects In... (scroll view).

这篇关于如何将UIScrollView添加到“界面”构建器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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