CountdownLabel alternatives and similar libraries
Based on the "UI" category.
Alternatively, view CountdownLabel alternatives based on common mentions on social networks and blogs.
-
Charts
Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. -
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
Material
A UI/UX framework for creating beautiful applications. -
NVActivityIndicatorView
A collection of awesome loading animations -
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
LTMorphingLabel
[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift. -
SwiftMessages
A very flexible message bar for UIKit and SwiftUI. -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
AMScrollingNavbar
Scrollable UINavigationBar that follows the scrolling of a UIScrollView -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
Macaw
Powerful and easy-to-use vector graphics Swift library with SVG support -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
TextFieldEffects
Custom UITextFields effects inspired by Codrops, built using Swift -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
SPPermission
Universal API for request permission and get its statuses. -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
ImagePicker
:camera: Reinventing the way ImagePicker works. -
PermissionScope
A Periscope-inspired way to ask for iOS permissions. -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
SCLAlertView
Beautiful animated Alert View. Written in Swift -
Instructions
Create walkthroughs and guided tours (coach marks) in a simple way, with Swift. -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
TLYShyNavBar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
PKHUD
A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8. -
Siren
Notify users when a new version of your app is available and prompt them to upgrade. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
DGElasticPullToRefresh
Elastic pull to refresh for iOS developed in Swift -
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
XLActionController
Fully customizable and extensible action sheet controller written in Swift -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros. -
DOFavoriteButton
Cute Animated Button written in Swift. -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of CountdownLabel or a related project?
README
CountdownLabel
Simple countdown UILabel with morphing animation, and some useful function.
[sample](Screenshots/example01.gif)
features
- Simple creation
- Easily get status of countdown from property and delegate.
- Insert some of function, and completion
- Style change as usual as UILabel do
- Morphing animation from LTMorphingLabel.
- XCTest assertion
Version vs Swift version.
Below is a table that shows which version of what you should use for your Swift version.
Swift version | version |
---|---|
4.2 | >= 4.0 |
4.0, 4.1 | >= 3.0 |
3.X | >= 2.0 |
2.3 | 1.3 |
Usage
You need only 2 lines.
// from current Date, after 30 minutes.
let countdownLabel = CountdownLabel(frame: frame, minutes: 30) // you can use NSDate as well
countdownLabel.start()
Morphing example
Use animationType
.
Those effect comes from LTMorphingLabel.
let countdownLabel = CountdownLabel(frame: CGRectZero, time: 60*60)
countdownLabel.animationType = .Pixelate
countdownLabel.start()
morphing effect | example |
---|---|
.Burn | [sample](Screenshots/exampleBurn.gif) |
.Evaporate | [sample](Screenshots/exampleEvaporate.gif) |
.Fall | [sample](Screenshots/exampleFall.gif) |
.Pixelate | [sample](Screenshots/examplePixelate.gif) |
.Scale | [sample](Screenshots/exampleScale.gif) |
.Sparkle | [sample](Screenshots/exampleSparkle.gif) |
Style
you can directly allocate it as a UILabel property just like usual.
countdownLabel.textColor = .orangeColor()
countdownLabel.font = UIFont(name:"Courier", size:UIFont.labelFontSize())
countdownLabel.start()
[sample](Screenshots/example02.gif)
Get Status of timer
there's some property for reading status.
countdownLabel.timeCounted // timer that has been counted
countdownLabel.timeRemaining // timer's remaining
// example
@IBAction func getTimerCounted(sender: UIButton) {
debugPrint("\(countdownLabel.timeCounted)")
}
@IBAction func getTimerRemain(sender: UIButton) {
debugPrint("\(countdownLabel.timeRemaining)")
}
[sample](Screenshots/example03.gif)
Control countdown
You can pause, start, change time.
// check if pause or not
if countdownLabel.isPaused {
// timer start
countdownLabel.start()
} else {
// timer pause
countdownLabel.pause()
}
// -2 minutes for ending
@IBAction func minus(btn: UIButton) {
countdownLabel.addTime(-2)
}
// +2 minutes for ending
@IBAction func plus(btn: UIButton) {
countdownLabel.addTime(2)
}
[sample](Screenshots/example04.gif)
Insert Function
Using then
function or delegate
, you can set your function anywhere you like.
// then property
countdownLabel.then(10) { [unowned self] in
self.countdownLabel.animationType = .Pixelate
self.countdownLabel.textColor = .greenColor()
}
countdownLabel.then(5) { [unowned self] in
self.countdownLabel.animationType = .Sparkle
self.countdownLabel.textColor = .yellowColor()
}
countdownLabel.start() {
self.countdownLabel.textColor = .whiteColor()
}
// delegate
func countingAt(timeCounted timeCounted: NSTimeInterval, timeRemaining: NSTimeInterval) {
switch timeRemaining {
case 10:
self.countdownLabel6.animationType = .Pixelate
self.countdownLabel6.textColor = .greenColor()
case 5:
self.countdownLabel6.animationType = .Sparkle
self.countdownLabel6.textColor = .yellowColor()
default:
break
}
}
func countdownFinished() {
self.countdownLabel.textColor = .whiteColor()
}
[sample](Screenshots/example06.gif)
Attributed Text
you can set as attributedText too. note:but morphing animation will be disabled.
countdownLabel.setCountDownTime(30)
countdownLabel.timeFormat = "ss"
countdownLabel.countdownAttributedText = CountdownAttributedText(text: "timer HERE in text", replacement: "HERE")
countdownLabel.start()
[sample](Screenshots/example07.gif)
Format
Don't specified over 24 hours or you'll get wrong format.
CountdownLabel uses 00:00:00 (HH:mm:ss)
as default format.
if you prefer using another format, Your can set your time format like below.
countdownLabel.timeFormat = @"mm:ss"
Scheduled
you can set scheduled timer
// after 10 minutes will start a countdown from 20.
let fromDate = NSDate().dateByAddingTimeInterval(10)
let targetDate = fromDate.dateByAddingTimeInterval(20)
let countdownLabel = CountdownLabel(frame: CGRectZero, fromDate: fromDate, targetDate: targetDate)
countdownLabel.start()
Check Status
some public properties are useful.
countdownLabel.isCounting // check timer is counting now
countdownLabel.isPaused // check timer was stopped
countdownLabel.isFinished // check timer has ended
countdownLabel.morphingEnabled // check morphing is enabled
Requirements
- iOS 9.0+
- Swift 2.3+
- ARC
Installation
CocoaPods
available on CocoaPods. Just add the following to your project Podfile:
pod 'CountdownLabel'
use_frameworks!
Carthage
To integrate into your Xcode project using Carthage, specify it in your Cartfile:
github "suzuki-0000/CountdownLabel"
Inspirations
- LTMorphingLabel is motivation for creating this.
- In many reference from MZTimerLabel.
License
available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the CountdownLabel README section above
are relevant to that project's source code only.