GithubHelp home page GithubHelp logo

stokatyan / scrollcounter Goto Github PK

View Code? Open in Web Editor NEW
113.0 113.0 24.0 23 KB

ScrollCounter is an iOS framework for getting a nice scrolling animation when transitioning between numbers. This framework is modeled after the animations seen in the Robinhood app.

License: MIT License

Swift 100.00%

scrollcounter's People

Contributors

n-ihad avatar ngeri avatar stokatyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scrollcounter's Issues

Support for comma delimiter

Awesome library. Could definitely put this to use. Do you plan to add support for comma delimiters for thousand, millions, etc.? (e.g 1,000.00 or 1,000,000.00)

3.89 turns into 3.8 when number is displayed and animation is finished

Seems like there's an issue when decimalPlaces = 2 (and I think in general regardless of decimalPlaces) 3.89 (or any number ending with 9 after decimal) turns into 3.8 (cutting off or perhaps rounding the last digit?) when calling method func setValue(_ value: Float, animated: Bool = true).

OR when number is 3.199 and decimal places is 3, resulting in displaying 3.1 9, middle number after decimal just disappeared

Initializing the digitScrollers

Greetings!

Attempting to use your cocoa pod. Getting an issue when initializing the NumberScrollCounter. In the public init, you have the line:

frame.size.height = digitScrollers.first!.height

However, the digitScrollers are set as the top as an empty array and never set to a value. So โ€“ I am getting an "Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value" error when attempting to use this. Any suggestions?

Here is my call trying to use the NumberScrollCounter:

let label = NumberScrollCounter(value: 0, scrollDuration: 0.33, decimalPlaces: 0, font: UIFont(name: "TitanOne", size: 56)!, textColor: K.Colors.yellow!, animateInitialValue: true, gradientColor: .black, gradientStop: 0.2)

Nice but doesn't size!

Thanks for a nice component. Unfortunately I doesn't work well when I try to use it right-aligned, due the sizing being incorrect. When adding/removing digits, the size of the whole view isn't updated, at least if the view is positioned using auto-layout.

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.