效果
要求
- Swift 3.0
- iOS 8.0
- Xcode 8.0
安装
WJClipsButton is available through CocoaPods . To install it, simply add the following line to your Podfile:
pod "WJClipsButton"
使用
Code
Import
import WJClipsButton
Init && Setup
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
Picture is truth
@IBInspectable Supported
Delegate
// button tap action
func didTapClipsButton()
// button unlock action
func clipsButtonDidUnlock()
// button lock action
func clipsButtonDidLock()
作者
jingzhilehuakai, wj_jingzhilehuakai@163.com
许可
WJClipsButton is available under the MIT license. See the LICENSE file for more info.
项目主页:http://www.open-open.com/lib/view/home/1498720580554
扫码二维码 获取免费视频学习资料
- 本文固定链接: http://phpxs.com/post/5739/
- 转载请注明:转载必须在正文中标注并保留原文链接
- 扫码: 扫上方二维码获取免费视频资料
查 看2022高级编程视频教程免费获取