WJClipsButton 1.0.1

WJClipsButton 1.0.1

测试测试过
Lang语言 SwiftSwift
许可证 MIT
Released最后发布2017年6月
SwiftSwift 版本3.0
SPM支持 SPM

cbangchen维护。



效果

要求

  • Swift 3.0
  • iOS 8.0
  • Xcode 8.0

安装

WJClipsButton 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "WJClipsButton"

用法

代码

导入

import WJClipsButton

初始化 && 设置

let wjButton = WJClipsButton.init(frame: CGRect.init(x: 0, y: 0, width: 300, height: 50))
wjButton.center = self.view.center
wjButton.cornerRadius = 10
wjButton.setButtonColor(.blue, status: .normal)
wjButton.setButtonColor(.yellow, status: .highlighted)
wjButton.setButtonColor(.red, status: .selected)
wjButton.setButtonTitle("I gonna start ... en ?", for: .normal)
wjButton.setButtonTitle("Touching ... friction.", for: .highlighted)
wjButton.setButtonTitle("Locked, locked.", for: .selected)
self.view.addSubview(wjButton)

Storyboard

图片为证

@IBInspectable 支持的

委托

// button tap action
func didTapClipsButton()
    
// button unlock action
func clipsButtonDidUnlock()
    
// button lock action
func clipsButtonDidLock()

作者

jingzhilehuakai, [email protected]

许可证

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