Code Monkey home page Code Monkey logo

pmcountinglabel's Introduction

PMCountingLabel

This is a subclass of UILabel and when used can be used for counting as a timer or some sort of score display. To use follow these steps

let counter = PMCountingLabel()

// add to the subview as normal then call count function

like so:

counter.count(fromValue: 1, to: castScoreToFloat, withDuration: 5, withAnimationType: .EaseOut, withCounterType: .Int)

fromValue: the number you wish the counter to start from to: the number you wish the counter to stop at withDuration: the length of the time the counter should run for until it reaches its maximum value animationType: the style of animation counterType: if you require float values to display or int values to display

Animation Type:

there are currently 3 options of animation: Liner Ease In Ease Out

//MARK:- Enums
    //MARK: Animation Type
    enum PMCounterAnimationType {
        // add the ability to change our animation
        case Linear
        case EaseIn
        case EaseOut
    }
    
    //MARK: Counter Type
    enum PMCounterType{
        case Int
        case Float
    }

pmcountinglabel's People

Contributors

philmartin83 avatar

Stargazers

Kyrylo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.