项目介绍:
Installation 安装 支持 cocoapods
Available in CocoaPods
pod "AURUnlockSlider"
使用方法:
Import 导入头文件
[Objective-C] 查看源文件 复制代码
import AURUnlockSlider
Init View and add the subView 初始化方法
[Objective-C] 查看源文件 复制代码
let unlockSlider = AURUnlockSlider(frame: CGRectMake(0.0, 0.0, self.view.bounds.size.width * 0.8, 70.0)) self.view.addSubview(unlockSlider)
conform to the delegate 代理方法
[Objective-C] 查看源文件 复制代码
unlockSlider.delegate = self func unlockSliderDidUnlock(snapSwitch: AURUnlockSlider) { }
Custom the attributes 自定义属性
[Objective-C] 查看源文件 复制代码
unlockSlider.sliderText = "Slide to Unlock" unlockSlider.sliderTextColor = UIColor.whiteColor() unlockSlider.sliderTextFont = UIFont(name: "HelveticaNeue-Thin", size: 20.0)! unlockSlider.sliderColor = UIColor.clearColor() unlockSlider.sliderBackgroundColor = UIColor(red: 231/255, green: 232/255, blue: 226/255, alpha: 0.5)
DEMO 直接下载: