- 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
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.
CKCountdownButton is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "CKCountdownButton"
- 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
Quanlong He, [email protected] Tomasz Szulc
CKCountdownButton is available under the MIT license. See the LICENSE file for more info.