【文件属性】:
文件名称:Stacks:受SwiftUI启发的基本UIKit包装器
文件大小:6KB
文件格式:ZIP
更新时间:2021-04-17 02:09:28
Swift
堆栈
UIStackView方便的API启发SwiftUI。
let stack: UIView = . hStack ( alignment : . center , margins : . all ( 16 ), [
. vStack ( spacing : 8 , [
titleLabel,
subtitleLabel
]),
. spacer ( minLength : 16 ),
star
])
受SwiftUI启发的简洁语法
您的代码与创建的视图层次结构匹配
垫片会自动调整到堆栈视图轴
边距自动启用isLayoutMarginsRelativeArrangement
UIEdgeInsets扩展是单独可用的。
extension UIEdgeInsets {
static func all ( _
【文件预览】:
Stacks-main
----.swiftpm()
--------xcode()
----LICENSE(1KB)
----Sources()
--------Stacks.swift(8KB)
----Package.swift(311B)
----.gitignore(2KB)
----README.md(989B)