An objective-c UIView which provide a mechanism to show numbers with rolling effect, like in counter. Click to see video
ADTickerLabel works on any iOS version only greater or equal than 5.0 and is compatible with only ARC projects. It depends on the following Apple frameworks:
- Foundation.framework
- UIKit.framework
- CoreGraphics.framework
- QuartzCore.framework
You will need LLVM 3.0 or later in order to build ADTickerLabel.
Add pod 'ADTickerLabel'
to your Podfile or pod 'ADTickerLabel', :head
if you're feeling adventurous.
Another way to add the ADGraphView to your project is to directly add the source files and resources to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- Open your project in Xcode, than drag and drop ADTickerLabel.h and ADTickerLabel.m files onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
- Include ADGraphView wherever you need it with
#import "ADTickerLabel.h"
.
/*
Width and height calculates automatically after you have set the font and characterWidth or if you want ypu can use default values
*/
ADTickerLabel *tickerLabel = [[ADTickerLabel alloc] initWithFrame: CGRectMake(100, 50, 0, 15)];
tickerLabel.font = [UIFont boldSystemFontOfSize: 12];
tickerLabel.characterWidth = 8;
tickerLabel.textColor = [UIColor whiteColor];
[self addSubview: tickerLabel];
tickerLabel.text = @"1908";
Also you can see the example of usage in ViewController.m in demo project.
This code is distributed under the terms and conditions of the MIT license.
**Version 0.59 @ 22.6.13
- Add support terxt changing animation speed.
Version 0.5 @ 10.6.13
- Initial release.