如何使用 xib 的 AutoSizing 属性iPhone

发布于 2024-09-11 05:24:03 字数 102 浏览 1 评论 0原文

我想知道如何在界面生成器中使用自动调整大小属性,即如何在子视图高度、宽度及其在超级视图中的位置的自动调整中使用该属性。

谢谢,

问候

tek3

I want to know how to use autosizing property in interface builder i.e. how this property can be used in autoadjustment of subview height , width and their position in superview.

Thanx,

Regards

tek3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

早茶月光 2024-09-18 05:24:03

自动调整大小功能的使用仅在 iOS 中旋转视图时才真正适用。例如:

  1. 在视图中选择一个对象,例如
  2. 检查器调色板“按钮大小”窗格的“自动调整大小”部分中的一个按钮:通过单击红色“内部”箭头来激活它们。
  3. 现在单击“视图”窗口标题栏右上角的“自动旋转”按钮。

请注意按钮现在如何缩放和拉伸。现在,在自动调整大小检查器区域中尝试激活和停用不同的“弹簧和支柱”,并继续单击自动旋转按钮在纵向和横向视图之间切换。

您很快就会直观地了解这些控件如何影响应用程序的相对布局。

The use of the autosizing function only really applies in iOS when you are rotating views. So for instance:

  1. select an object in the view, say, a button
  2. in the "Autosizing" section of the "Button Size" pane of the Inspector palette: activate the red "internal" arrows by clicking on them.
  3. Now click the "autorotate" button in the upper right of the title bar for the View window.

notice how the button now scales and stretches. Now experiment with activating and de-activating different "springs and struts" in the Autosizing inspector area, and continue to click the auto-rotate button to toggle between portrait and landscape views.

You'll soon have an intuitive understanding of how these controls effect the relative layout of your app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文