【文件属性】:
文件名称:然后:for适用于Swift初始化程序的超甜语法糖
文件大小:7KB
文件格式:ZIP
更新时间:2021-02-06 10:49:05
swift syntactic-sugar SwiftSwift
然后
:sparkles: Swift初始化程序的超级甜蜜语法糖。
乍看上去
初始化UILabel,然后设置其属性。
let label = UILabel (). then {
$0 . textAlignment = . center
$0 . textColor = . black
$0 . text = " Hello, World! "
}
这等效于:
let label : UILabel = {
let label = UILabel ()
label. textAlignment = . center
label. textColor = . black
la
【文件预览】:
Then-master
----.gitignore(118B)
----codecov.yml(88B)
----Sources()
--------Then()
----Then.podspec(711B)
----LICENSE(1KB)
----.github()
--------workflows()
----README.md(3KB)
----Package.swift(344B)
----Tests()
--------ThenTests()