Latest 0.1.8
Homepage https://github.com/gonzalonunez/GNCheckView
License MIT
Platforms ios 8.0, requires ARC
Authors

Version
License
Platform

GNCheckView is a UIView subclass that neatly animates between a checked and an unchecked state. Serves as a nice alternative to UITableViewAccessoryTypeCheckmark or for any other of your check-marking needs!

Screenshot

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Using GNCheckView is incredibly simple! It all comes down to one function:

public func check(shouldCheck:Bool, animated:Bool)

For the lazier people in life, here are a couple convenience functions!

public func checkAnimated(animated:Bool)

public func uncheckAnimated(animated:Bool)

For the nitpickier people in life, GNCheckView also comes with several properties that each change the behavior.

@IBInspectable public var primaryColor = UIColor.blackColor()

This is the color that the checkmark is drawn in.

@IBInspectable public var secondaryColor = UIColor.whiteColor()

This is what serves as the backgroundColor of the view. See -invertsOnCheck for more.

@IBInspectable public var initiallyDrawn = false

This determines if the checkmark is initially drawn or not.

@IBInspectable public var showsBorder = true

If true, the view automatically has a border around it with a cornerRadius of 5, borderWidth of 2, and a borderColor that matches the primaryColor

@IBInspectable public var invertsOnCheck = true

If true, once checked the view that switches the check to the secondaryColor and the background to the primaryColor, providing for a nice little effect.

Finally, there’s a boolean for you to check the state!

public var checked : Bool

Installation

GNCheckView is available through CocoaPods.
To install it, simply add the following lines to your Podfile:

use_frameworks!
pod "GNCheckView"

Author

Gonzalo Nunez, [email protected]

License

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

Latest podspec

{
    "name": "GNCheckView",
    "version": "0.1.8",
    "summary": "A UIView subclass that neatly animates between a checked and an unchecked state.",
    "description": "A UIView subclass that neatly animates between a checked and an unchecked state. Serves as a nice alternative to UITableViewAccessoryTypeCheckmark or for any other of your check-marking needs!",
    "homepage": "https://github.com/gonzalonunez/GNCheckView",
    "license": "MIT",
    "authors": {
        "Gonzalo Nunez": "[email protected]"
    },
    "source": {
        "git": "https://github.com/gonzalonunez/GNCheckView.git",
        "tag": "0.1.8"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "GNCheckView": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This