Tapa 0.3.2

Tapa 0.3.2

wanderingfairy 维护。



Tapa 0.3.2

  • wanderingfairy

Swift 5.2VersionLicensePlatform

Tapa

Tapa 有助于在创建视图时简化实现。

要求

平台 版本
iOS >= 10.0
语言 版本
Swift >= 5.0

安装

CocoaPods

将以下行添加到 Podfile,并执行 $ pod install

pod 'Tapa'

使用方法

Tapa 在调用 import Tapa 后启动。

示例

轻松添加多个视图

  public func addSubviews(views: [UIView]) {
    views.forEach({ addSubview($0) })
  }
原始 Tapa
addSubviewsBefore addSubviewsAfter

轻松添加 UITextField 的左右内边距

//in anywhere

textField.addLeftPadding() 
//The default is 10. 
//But if you want, pass the other value to the parameter.
原始 Tapa
addLeftPaddingBefore addLeftPaddingAfter

轻松设置视图的每个角落。

  override func viewWillLayoutSubviews() {
    super.viewWillLayoutSubviews()
    
    presentButton.roundCorners([.topRight, .topLeft], radius: 50)
  }
.topRight, .topLeft .topLeft, bottomRight
topleft-topright-50 topright-bottomleft-50

作者

wanderingfairy, [email protected]

许可证

Tapa 是在 MIT 许可证下可用的。有关更多信息,请参阅 LICENSE 文件。