https://github.com/badoo/bmaspinninglabel
BMASpinningLabel is an UI component which provides easy way for displaying and animating text inside it
https://github.com/badoo/bmaspinninglabel
Last synced: about 1 year ago
JSON representation
BMASpinningLabel is an UI component which provides easy way for displaying and animating text inside it
- Host: GitHub
- URL: https://github.com/badoo/bmaspinninglabel
- Owner: badoo
- License: mit
- Created: 2017-03-14T16:03:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T10:26:29.000Z (over 9 years ago)
- Last Synced: 2024-10-14T00:05:23.044Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 1.58 MB
- Stars: 151
- Watchers: 10
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BMASpinningLabel [](https://travis-ci.org/badoo/BMASpinningLabel) [](https://codecov.io/github/badoo/BMASpinningLabel?branch=master) [](https://img.shields.io/cocoapods/v/BMASpinningLabel.svg)
`BMASpinningLabel` is an UI component which provides easy way for displaying and animating text inside it.
Text changes animated as 'spins' either downwards or upwards.
Below you can see example how it works.
## How to use
```objectivec
// Creation
BMASpinningLabel *label = [[BMASpinningLabel alloc] initWithFrame:CGRectMake(0, 0, 100, 40)];
self.navigationItem.titleView = label;
// Set initial value
NSAttributedString *initialTitle = [[NSAttributedString alloc] initWithString:@"Initial Title"];
self.label.attributedTitle = initialTitle;
// Update with animation
NSAttributedString *newTitle = [[NSAttributedString alloc] initWithString:@"New Title"];
[self.label setAttributedTitle:newTitle spinDirection:BMASpinDirectionUpward spinSettings:BMASpinSettingsAnimated];
```
## How to install
### Using CocoaPods
1. Include the following line in your `Podfile`:
```
pod 'BMASpinningLabel', '~> 1.0'
```
2. Run `pod install`
### Manually
1. Clone, add as a submodule or [download.](https://github.com/badoo/BMASpinningLabel/archive/master.zip)
2. Add the files under `BMASpinningLabel` to your project.
3. Make sure your project is configured to use ARC.
## License
Source code is distributed under MIT license.
## Blog
Read more on our [tech blog](http://techblog.badoo.com/) or explore our other [open source projects](https://github.com/badoo)