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
Include the following line in your
pod 'BMASpinningLabel', '~> 1.0'
- Clone, add as a submodule or download.
- Add the files under
BMASpinningLabelto your project.
- Make sure your project is configured to use ARC.
Source code is distributed under MIT license.