调整控件以适合其容器在Interface Builder中 [英] Sizing a control to fit its container in Interface Builder

查看:119
本文介绍了调整控件以适合其容器在Interface Builder中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个拆分视图,我想用一个表视图(一个相当常见的用例,我会想)填充它的一半。有没有办法告诉表视图的大小本身适合拆分视图,或者我真的必须手动调整大小?

Let's say I have a split view, and I want to fill half of it with a table view (a fairly common use case, I would think). Is there any way to tell the table view to size itself to fit the split view or do I really have to size it manually?

推荐答案

据我所知,手动操作是唯一的方法。但是,如果您打开捕捉可可指南,内部视图将在您向它们拖动时捕捉到封闭视图的边缘。这使得比手动将边缘鼠标移动到位置更容易,或手动编辑大小以匹配。

As far as I know, doing it manually is the only way to go. However, if you turn on "snap to cocoa guidelines", the inner view will snap to the edges of the enclosing view as you drag towards them. This makes it easier than having to manually mouse the edges into place, or manually edit the sizes to match.

这篇关于调整控件以适合其容器在Interface Builder中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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