JQScrollNumberLabel 仿tumblr热度滚动
JQScrollNumberLabel imitation Tumblr heat rolling digital number, a digital display controls, when you change the numbers, to scroll animation and animation and number restrictions, dynamically create and instantiate the optional custom font style, etc..
The JQScrollNumberLabel folder to copy the two files into the project, where you need to import the header file
#import "JQScrollNumberLabel.h"
@interface ViewController ()
@property (nonatomic, strong)JQScrollNumberLabel *scrollLabel;
@end
A method to initialize the descendants of font size or a font, do not set the frame, only need to change its position, because it is based on the automatic calculation of the size of its font size, to dynamically set the number of parameters to don't take rowNumber:
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.scrollLabel = [[JQScrollNumberLabel alloc] initWithNumber:@(1) font:[UIFont fontWithName:@"AppleSDGothicNeo-SemiBold" size:40] textColor:[UIColor grayColor] rowNumber:5];
self.scrollLabel.frame = CGRectMake(100, 100, self.scrollLabel.frame.size.width, self.scrollLabel.frame.size.height);
[self.view addSubview:self.scrollLabel];
}
@end
When you want to change the value, call the following method, when the animated parameter is NO will not play animation
[self.scrollLabel changeToNumber:@(10) animated:YES];
-
1.
目前 还不支持 负数的 显示 -
2.显示
的 位 数 有限 制 ,最大 8位
iOS开发
者 交流 群 :446310206喜 欢就❤️❤️❤️star一 下 吧!你的支持 是 我 更新 的 动力! Love is every every every star! Your support is my renewed motivation!
JQTumblrHud-
JQScrollNumberLabel:仿tumblr热度滚动
TumblrLikeAnimView-仿Tumblr
JQMenuPopView-仿Tumblr弹出视图发音频、视频、图片、
This code is distributed under the terms and conditions of the MIT license.