Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cybertk/ckcountdownbutton

Display a countdown timer on UIButton
https://github.com/cybertk/ckcountdownbutton

Last synced: about 2 months ago
JSON representation

Display a countdown timer on UIButton

Awesome Lists containing this project

README

        

# CKCountdownButton

[![CI Status](http://img.shields.io/travis/cybertk/CKCountdownButton/master.svg?style=flat)](https://travis-ci.org/cybertk/CKCountdownButton)
[![Version](https://img.shields.io/cocoapods/v/CKCountdownButton.svg?style=flat)](http://cocoadocs.org/docsets/CKCountdownButton)
[![License](https://img.shields.io/cocoapods/l/CKCountdownButton.svg?style=flat)](http://cocoadocs.org/docsets/CKCountdownButton)
[![Platform](https://img.shields.io/cocoapods/p/CKCountdownButton.svg?style=flat)](http://cocoadocs.org/docsets/CKCountdownButton)

## Features

* Button is disabled when counting
* Button is auto enabled when counted down
* Click on button can auto start counting
* Set customized background color while counting
* Support customized title while counting

## Example

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

Or run `pod try CKCountdownButton` for latest stable version.

## Requirements

## Installation

CKCountdownButton is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

pod "CKCountdownButton"

## Usage

### Use in Storyboard

- Drag a UIButton from Object Library
- Set the class of UIBUtton to `CKCountdownButton`.
- Change the type of UIButton to `Custom`, or it will flash while counting down.
- Set `count` in **User Defined Runtime Attributes** window.
- Set `startCountWhenClick` in **User Defined Runtime Attributes** window if you want start counting when user click the button
- Set **Title** for **Disabled State**, we use `#` as a placeholder, which will be replaced to acture count number while counting

## Author

Quanlong He, [email protected]
[Tomasz Szulc](https://github.com/tomkowz)

## License

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