Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/javalnanda/NumericAnimatedLabel
Animate numeric value while setting new value to label
https://github.com/javalnanda/NumericAnimatedLabel
Last synced: 3 months ago
JSON representation
Animate numeric value while setting new value to label
- Host: GitHub
- URL: https://github.com/javalnanda/NumericAnimatedLabel
- Owner: javalnanda
- License: mit
- Created: 2017-05-25T05:23:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-25T11:48:50.000Z (over 7 years ago)
- Last Synced: 2024-05-29T04:52:13.165Z (5 months ago)
- Language: Shell
- Size: 368 KB
- Stars: 26
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - NumericAnimatedLabel - Swift UIView for showing numeric label with incremental and decremental step animation while changing value. Useful for scenarios like displaying currency. (UI / Label)
README
# NumericAnimatedLabel
[![CI Status](http://img.shields.io/travis/javalnanda/NumericAnimatedLabel.svg?style=flat)](https://travis-ci.org/javalnanda/NumericAnimatedLabel)
[![Version](https://img.shields.io/cocoapods/v/NumericAnimatedLabel.svg?style=flat)](http://cocoapods.org/pods/NumericAnimatedLabel)
[![License](https://img.shields.io/cocoapods/l/NumericAnimatedLabel.svg?style=flat)](http://cocoapods.org/pods/NumericAnimatedLabel)
[![Platform](https://img.shields.io/cocoapods/p/NumericAnimatedLabel.svg?style=flat)](http://cocoapods.org/pods/NumericAnimatedLabel)
[![Twitter: @javalnanda](https://img.shields.io/badge/[email protected]?style=flat)](https://twitter.com/javalnanda)![image](https://github.com/javalnanda/NumericAnimatedLabel/blob/master/NumericAnimatedLabel.gif)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
## Installation
NumericAnimatedLabel is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "NumericAnimatedLabel"
```## Setup
The only thing you need to do is import `NumericAnimatedLabel`, add a UIView to storyboard and create an outlet of it.
```swift
import NumericAnimatedLabel
```
```swift
@IBOutlet weak var numericLabel: NumericAnimatedLabel!
``````swift
override func viewDidLoad() {
super.viewDidLoad()
// Set Value
numericLabel.setValue(v: walletBalance)// Customize if required
numericLabel.textAlignment = .center
numericLabel.formatString = "%.2f"
numericLabel.textFont = UIFont.boldSystemFont(ofSize: 20.0)
// Text color can be changed from storyboard inspector or programmatically also.
}
```
## Suggestions or feedback?Feel free to create a pull request, open an issue or find me [on Twitter](https://twitter.com/javalnanda).
## Author
javalnanda, [email protected]
## License
NumericAnimatedLabel is available under the MIT license. See the LICENSE file for more info.