ios – 如何在Xcode 7中使用对象库的Stack View

ios – 如何在Xcode 7中使用对象库的Stack View,第1张

概述我最近安装了 Xcode 7 beta并找到了一些东西  像对象一样的新对象库 水平堆栈视图和垂直堆栈视图. When i put some controls inside it, stackview seems to be resizable according to the control size. When i present more controls the stack seems t 我最近安装了 Xcode 7 beta并找到了一些东西
像对象一样的新对象库

水平堆栈视图和垂直堆栈视图.

When i put some controls insIDe it,stackvIEw seems to be resizable
according to the control size. When i present more controls the stack
seems to be adjust automatically as of the stack vIEw.
Either
adjusting horizontally or vertically?

它是否来自其他一些移动平台

解决方法 使用UIStackVIEw的一个主要优点是它使用自动布局来定位和调整其排列的UIVIEws.因此,您不必担心将UIVIEws放置在UIStackVIEw中.对于水平堆栈,这意味着第一个排列视图的前缘固定到堆栈的前缘,最后排列的视图的后缘固定到堆栈的后缘.您可以尝试将两个或多个控件插入到水平堆栈视图中,它们如何相互水平对齐w.r.t.

The UIStackVIEw class provIDes a streamlined interface for laying out
a collection of vIEws in either a column or a row. Stack vIEws let you
Leverage the power of auto Layout,creating user interfaces that can
dynamically adapt to the device’s orIEntation,screen size,and any
changes in the available space. The stack vIEw manages the layout of
all the vIEws in its arrangedSubvIEws property. These vIEws are
arranged along the stack vIEw’s axis,based on their order in the
arrangedSubvIEws array. The exact layout varIEs depending on the stack
vIEw’s axis,distribution,alignment,spacing,and other propertIEs.

如何使用

以下是raywenderlich网站的详细教程:

http://www.raywenderlich.com/114552/uistackview-tutorial-introducing-stack-views

如需了解更多信息,请查看https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIStackView_Class_Reference/index.html

总结

以上是内存溢出为你收集整理的ios – 如何在Xcode 7中使用对象库的Stack View全部内容,希望文章能够帮你解决ios – 如何在Xcode 7中使用对象库的Stack View所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1099436.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存