Latest 3.0.1
Homepage https://github.com/amichnia/ASIACheckmarkView
License MIT
Platforms ios 8.0, requires ARC
Authors

Customizable checkmark button view. Allows to easily animate between states, with optional intermediate "Spinning" state – if you want to beautifully morph betweeen two states, but need to wait for API in between. Clean and moder look, along with being easy-to-use. Support Swift 3.0.1.

Screenshots:

Custom style Screenshot

Usage

Add button on storyboard, set its class to ASIACheckmarkView. Check the attributes inspector and play with the values, to get desired effect.

Note, that spinning animation does not work in storyboard IBDesignable.

Custom style Screenshot

Code

Animating state change:

Swift

let checkmark: ASIACheckmarkView

func changeState() {
        let newValue = !checkmark.boolValue // boolValue describes current checkmark state
        checkmark.animate(checked: newValue) // animate to state you want
}

func changeStateWithCompletion() {
        let newValue = !checkmark.boolValue // boolValue describes current checkmark state
        checkmark.animateTo(newValue){
            print("changed state to (checkmark.boolValue)")
        }
}

@IBAction func changeStateWithSpinner() {
        let newValue = !checkmark.boolValue
        checkmark.animate(checked: newValue)    // animate to state you want
        checkmark.isSpinning = true       // PLACE THIS AFTER ANIMATE TO CALL!
}

func endSpinning() {
        // OPTIONAL - You might call "checkmark.animate(checked: some_value)" here
        // - if you want to alter state after finishing spinning
        // (Yes -> spinning -> Yes) for example
        checkmark.isSpinning = false
}

Credits

Created by Andrzej Michnia.

Animations design by Asia Michnia

License

ASIACheckmarkView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ASIACheckmarkView",
    "version": "3.0.1",
    "summary": "Beatiful customizable morphing checkmark button - animation between states with optional spinning intermediate state.",
    "description": "Customizable checkmark button view. Allows to easily animate between states, with optional intermediate Spinning state - if you want to beautifully morph betweeen two states, but need to wait for API in between. Clean and moder look, along with being easy-to-use.",
    "homepage": "https://github.com/amichnia/ASIACheckmarkView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Andrzej Michnia": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/amichnia/ASIACheckmarkView.git",
        "tag": "3.0.1"
    },
    "source_files": "Sources",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This