All Projects → badoo → Bmaspinninglabel

badoo / Bmaspinninglabel

Licence: mit
BMASpinningLabel is an UI component which provides easy way for displaying and animating text inside it

BMASpinningLabel Build Status codecov.io CocoaPods Compatible

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

// 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.
  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 or explore our other open source projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].