Button animation made with the Playground
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
CheckmarkButton.playground Update to Swift 3 Oct 10, 2016
README.md Update README.md Jan 29, 2016



Button animation in Playgrounds (new in Xcode 7.3)


How to use ?

Just use the class Checkmark which is an subclass of UIButton use the CheckamarkDelegate to check if the button was pressed. You can customize the linewidth of the checkmark and checkmarkcolor.

class ButtonViewController : UIViewController,CheckamarkDelegate{
    var buttonView: UIButton!
    override func viewDidLoad() {
        self.view.frame = CGRect(x: 0, y: 0, width: 500, height: 500)
        self.view.backgroundColor = UIColor.whiteColor()
        let checkMark = Checkmark(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
        checkMark.backgroundColor = UIColor(red:0.92, green:0.11, blue:0.4, alpha:1)
        checkMark.center = self.view.center
        checkMark.delegate = self
        checkMark.lineWidth = 9.0
        checkMark.checkmarkColor = UIColor.whiteColor()
    func pressedCheckmark(checkmark: Checkmark) {
        print("Wuhhuuuu πŸ‘» do some stuff")