StateButton 0.1.1

StateButton 0.1.1

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2015年6月
SPM支持SPM

zyfu0000维护。



  • zyfu000

基于不同状态的UIButton的子类

StateButton

如何使用

var stateButton : StateButton!
stateButton.titles = ["facebook"]
stateButton.images = [UIImage(named: "icon_login_facebook")!, UIImage(named: "icon_login_twitter")!, UIImage(named: "icon_login_mail")!]
stateButton.titleColors = [UIColor.redColor(), UIColor.greenColor(), UIColor.blueColor()]
stateButton.closures = ([ { (index) -> () in
        println("State \(index)")
    },  
    { (index) -> () in
        println("State \(index)")
    },
    { (index) -> () in
        println("State \(index)")
    }])
stateButton.transitions = [(kCATransitionPush, kCATransitionFromTop), (kCATransitionMoveIn, kCATransitionFromLeft), (kCATransitionReveal, kCATransitionFromRight)]

安装

使用cocoapods

pod 'StateButton'

许可证

MIT