Latest 1.0.4
Homepage https://github.com/sammut91/LSCountdownView
License MIT
Platforms ios 11.0
Authors

Version
License
Platform

Usage

In order to use LSCountdownView simply initialise as basic version of the component as shown below:

let countdownView = LSCountdownView()

// Countdown until a future date
countdownView.countdown(until: futureDate)

// Countdown for a set interval with an increased interval
countdownView.countdown(for: 10000, inIntervalsOf: 0.5)

// Subscribe to all the changes 
countdownView.changeHandler = { interval in
print(interval)
}

LSCountdownView

This will instantiate a countdown timer that will run for a duration of 10 seconds starting from the current time. The current progress can be tracked through the callback changeHandler, and any custom logic you wish to be performed based on the progess should be applied here.

Example

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

Requirements

  • In order to use LSCountdownView, a minimum iOS version of 11.0 is required.
  • Swift 4.2

Installation

CountdownView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'LSCountdownView'

Author

Luke Sammut, [email protected]

License

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

Latest podspec

{
    "name": "LSCountdownView",
    "version": "1.0.4",
    "summary": "This is the summary of LSCountdownView and what it can do. This should be meaningful.",
    "description": "This is a iOS library that can be used to create a view that manages the counting down from a date to another date. This comes with theme support, as well as customisation in terms of the options that are displayed.",
    "swift_version": "4.2",
    "homepage": "https://github.com/sammut91/LSCountdownView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Luke Sammut": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sammut91/LSCountdownView.git",
        "tag": "1.0.4"
    },
    "platforms": {
        "ios": "11.0"
    },
    "source_files": "LSCountdownView/Classes/**/*"
}

Pin It on Pinterest

Share This