Latest 0.1.1
Homepage https://github.com/zyfu0000/StateButton
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Subclass UIButton with different states

StateButton

How to use

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)]

Installation

Use cocoapods

pod 'StateButton'

License

MIT

Latest podspec

{
    "name": "StateButton",
    "platforms": {
        "ios": "8.0"
    },
    "summary": "Button with different states",
    "requires_arc": true,
    "version": "0.1.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zyfu000": "[email protected]"
    },
    "homepage": "https://github.com/zyfu0000/StateButton",
    "source": {
        "git": "https://github.com/zyfu0000/StateButton.git",
        "tag": "0.1.1"
    },
    "frameworks": "UIKit",
    "source_files": "StateButton/*.{swift}"
}

Pin It on Pinterest

Share This