https://github.com/cybertk/ckcountdownbutton
Display a countdown timer on UIButton
https://github.com/cybertk/ckcountdownbutton
Last synced: 3 months ago
JSON representation
Display a countdown timer on UIButton
- Host: GitHub
- URL: https://github.com/cybertk/ckcountdownbutton
- Owner: cybertk
- License: mit
- Created: 2014-08-01T16:14:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-10T13:43:14.000Z (about 10 years ago)
- Last Synced: 2025-04-11T04:42:00.283Z (3 months ago)
- Language: Objective-C
- Homepage:
- Size: 2.75 MB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CKCountdownButton
[](https://travis-ci.org/cybertk/CKCountdownButton)
[](http://cocoadocs.org/docsets/CKCountdownButton)
[](http://cocoadocs.org/docsets/CKCountdownButton)
[](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
## AuthorQuanlong He, [email protected]
[Tomasz Szulc](https://github.com/tomkowz)## License
CKCountdownButton is available under the MIT license. See the LICENSE file for more info.