UIBuilderKit 0.1.0

UIBuilderKit 0.1.0

‘jsryudev’维护。



  • 作者
  • jsryudev

UIBuilderKit

Version License Platform

🛠UIKit的构建器模式。

简览

let textLabel = UILabel.Builder()
  .text("Hello, World!")
  .textAlignment(.center)
  .textColor(.black)
  .font(.italic)
  .build()

这等同于

let label: UILabel = {
  let label = UILabel()
  label.text = "Hello, World!"
  label.textAlignment = .center
  label.textColor = .black
  label.font = .italicSystemFont(ofSize: 17)
  return label
}()

安装

UIBuilderKit可通过CocoaPods获得。为了安装,只需将以下行添加到您的Podfile中

pod 'UIBuilderKit'

作者

jsryudev, [email protected]

许可证

UIBuilderKit遵循MIT许可证。有关更多信息,请参阅LICENSE文件。